1 ?RCS: $Id: MailAuthor.U 1 2006-08-24 12:32:52Z rmanfredi $
3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
11 ?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
13 ?RCS: $Log: MailAuthor.U,v $
14 ?RCS: Revision 3.0.1.5 1997/02/28 15:04:41 ram
15 ?RCS: patch61: added support for src.U
17 ?RCS: Revision 3.0.1.4 1994/08/29 16:05:09 ram
18 ?RCS: patch32: avoid message sending if they said no previously
20 ?RCS: Revision 3.0.1.3 1993/10/16 13:47:30 ram
21 ?RCS: patch12: now makes sure user-specified address is in Internet format
23 ?RCS: Revision 3.0.1.2 1993/09/13 15:48:49 ram
24 ?RCS: patch10: reverted to original intent by the Author himself
26 ?RCS: Revision 3.0.1.1 1993/08/27 14:38:38 ram
27 ?RCS: patch7: now prompts user for its e-mail address
28 ?RCS: patch7: no longer silent when mail has been sent
30 ?RCS: Revision 3.0 1993/08/18 12:05:06 ram
31 ?RCS: Baseline for dist 3.0 netwide release.
35 ?X: This unit asks the user to please send a message to the author.
36 ?X: To force inclusion of this unit, you must add it's name to the
37 ?X: dependancies on the MAKE line in your private copy of End.U.
38 ?X: This allows a smart mailagent program to automatically let users know
39 ?X: when their package is out of date, and to allow users to be notified of
40 ?X: any future patches.
42 ?MAKE:MailAuthor mailpatches notifypatches usermail: test cat mailer \
43 package Myread patchlevel baserev rm rsrc Oldconfig Configdir
44 ?MAKE: -pick wipe $@ %<
46 ?S: Indicates whether the user would like future patches to be mailed
50 ?S: Indicates whether the user would like notification of future patches
54 ?S: This variable is used internally by Configure to keep track of the
55 ?S: user e-mail address, where notifications or patches should be sent.
56 ?S: A '-' value means the return address will be extracted by parsing
59 ?T:opt mailpatches notifypatches atsh status
60 : notify author that his package is used
61 if $test -f ../.config/mailauthor &&
62 cmp $rsrc/patchlevel.h ../.config/mailauthor >/dev/null 2>&1
64 status="say that you're using $package";
65 case "$mailpatches" in
66 true) status='have patches mailed to you as they are issued';;
68 case "$notifypatches" in
69 true) status='be notified when new patches are issued';;
73 You have already sent the author of $package (<MAINTLOC>) mail to
74 $status. If you wish, you may modify
75 your previous request by sending a new mail with different options.
78 rp='Should I send a status update to <MAINTLOC>?'
83 If you are able to send mail to the Internet, the author of $package would
84 really appreciate you letting me send off a quick note, just to say that you've
85 tried it. The author is more likely to spend time maintaining $package if it's
86 known that many people are using it, and you can even ask to get sent new
87 patches automagically this way if you wish. To protect your privacy, all I'll
88 say in the mail is the version of $package that you're using.
91 rp='Should I send mail to <MAINTLOC>?'
93 ?X: Ensure default is 'n' if question has been asked already, in case they
94 ?X: run Configure -d next time and answered 'n' the first time. Therefore,
95 ?X: an empty nomail will be created later on even if no mail is sent.
96 $test -f ../.config/nomail && dflt=n
102 echo "Great! Your cooperation is really appreciated."
105 Some braindead sites do not set a proper return address in the From: header of
106 their outgoing mail, making it impossible to reply to mail they generate.
107 If your site is broken in this way, write to your system administrator and get
108 it fixed!!! In the mean time, you can manually specify the Internet e-mail
109 address by which the author can get back to you, should there be a need to do
110 so. If manually specified, it should be something like "user@domain.top".
111 If your mail system generates addresses correctly, specify "none".
116 *) dflt="$usermail";;
118 rp='Manually specify a return address to use:'
128 echo "(Address does not look like an Internet one -- ignoring it.)"
130 ?X: If we can't trust their mailer or their return address, it's highly
131 ?X: suggested that they only register and don't ask to get anything from
132 ?X: the author, since it's likely to bounce in null-land -- RAM.
141 rp='Would you like to have new patches automatically mailed to you?'
142 case "$mailpatches" in
148 [yY]*) opt=' mailpatches'; mailpatches=true;;
152 rp='Ok, would you like to simply be notified of new patches?'
153 case "$notifypatches" in
160 [yY]*) opt=' notifypatches'; notifypatches=true;;
162 echo "Fine, I'll simply say that you've tried it then."
168 echo "Sending mail to <MAINTLOC>..." >&4
169 ?X: Bizarre hack here. We can't just put @SH in the hereis lines below, because
170 ?X: metaconfig will interpret it as a command, and there's no quoting mechanism.
171 ?X: Do it via a variable instead.
173 $mailer <MAINTLOC> <<EOM >/dev/null 2>&1
178 $atsh package $usermail $package $baserev $patchlevel$opt
180 $rm -f ../.config/mailauthor ../.config/nomail
181 cp $rsrc/patchlevel.h ../.config/mailauthor
186 echo "Oh well, maybe next time."
187 cp /dev/null ../.config/nomail