Commit | Line | Data |
---|---|---|
d8875586 MBT |
1 | ?RCS: $Id: MailList.U 1 2006-08-24 12:32:52Z rmanfredi $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi | |
4 | ?RCS: | |
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. | |
10 | ?RCS: | |
11 | ?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au> | |
12 | ?RCS: | |
13 | ?RCS: $Log: MailList.U,v $ | |
14 | ?RCS: Revision 3.0.1.1 1994/01/24 14:01:49 ram | |
15 | ?RCS: patch16: created | |
16 | ?RCS: | |
17 | ?RCS: | |
18 | ?X: | |
19 | ?X: This unit offers the user the option of subscribing to the mailing | |
20 | ?X: list. To force inclusion of this unit, you must add it's name to the | |
21 | ?X: dependancies on the MAKE line in your private copy of End.U. | |
22 | ?X: The address of the mailing list server must be set via a "list_request=..." | |
23 | ?X: entry in the .package file. This is usually done by running packinit and | |
24 | ?X: answering the proper questions. | |
25 | ?X: | |
26 | ?MAKE:MailList: cat mailer package Myread cf_name cf_email | |
27 | ?MAKE: -pick wipe $@ %< | |
28 | ?T:list_request list_sub list_unsub list_name | |
29 | ?X: | |
30 | ?X: The cf_name dependency is used through list_sub when the mailing list | |
31 | ?X: manager happens to be listserv, whereas cf_email is used whith majordomo | |
32 | ?X: or when the mailing list request address is scanned by a human. Since | |
33 | ?X: they do not appear within the unit itself, we need a lint hint. | |
34 | ?X: | |
35 | ?LINT:use cf_name cf_email | |
36 | : offer to join the mailing list | |
37 | list_request='<$list_request>' | |
38 | list_sub="<$list_sub>" | |
39 | list_unsub="<$list_unsub>" | |
40 | list_name="<$list_name>" | |
41 | $cat <<EOM | |
42 | ||
43 | There is a mailing list for discussion about $package and related issues. | |
44 | This is the preferred place to ask questions about the program and discuss | |
45 | modifications and additions with the author and other users. If you are able | |
46 | to send mail to the Internet, you are encouraged to subscribe. You need only | |
47 | ever subscribe once, and you can unsubscribe automatically at any time in the | |
48 | future. If you have already subscribed and you wish to unsubscribe now, you | |
49 | may do so by answering "unsubscribe". Answer "subscribe" to subscribe to the | |
50 | list. | |
51 | ||
52 | EOM | |
53 | rp="Subscribe to or unsubscribe from the $list_name mailing list?" | |
54 | dflt=neither | |
55 | . ./myread | |
56 | case "$ans" in | |
57 | [sS]*) $cat <<EOM | |
58 | ||
59 | You will be sent a message from the list server to let you know when your | |
60 | subscription has been successful and telling you how to submit articles and | |
61 | how to unsubscribe again when necessary. You may also unsubscribe by running | |
62 | this script again and asking it to do so for you. | |
63 | ||
64 | EOM | |
65 | echo "Sending mail to subscribe you to the $list_name list..." >&4 | |
66 | $mailer $list_request <<EOM >/dev/null 2>&1 | |
67 | Precedence: junk | |
68 | To: $list_request | |
69 | ||
70 | $list_sub | |
71 | EOM | |
72 | ;; | |
73 | [uU]*) echo "Sending mail to unsubscribe you from the $list_name list..." >&4 | |
74 | $mailer $list_request <<EOM >/dev/null 2>&1 | |
75 | Precedence: junk | |
76 | To: $list_request | |
77 | ||
78 | $list_unsub | |
79 | EOM | |
80 | ;; | |
81 | esac | |
82 |