home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume43
/
SmartList
/
part02
< prev
next >
Wrap
Internet Message Format
|
1994-07-05
|
56KB
From: berg@pool.informatik.rwth-aachen.de (Stephen R. van den Berg)
Newsgroups: comp.sources.misc
Subject: v43i067: SmartList - mailinglist package v3.03, Part02/05
Date: 5 Jul 1994 21:26:49 -0500
Organization: Sterling Software
Sender: kent@sparky.sterling.com
Approved: kent@sparky.sterling.com
Message-ID: <2vd4p9$nin@sparky.sterling.com>
X-Md4-Signature: 8ca11255fa395e62a0d007db1d75c20b
Submitted-by: berg@pool.informatik.rwth-aachen.de (Stephen R. van den Berg)
Posting-number: Volume 43, Issue 67
Archive-name: SmartList/part02
Environment: procmail, sendmail, ZMailer, smail, /bin/mail, UNIX, POSIX
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: procmail-3.03/SmartList/INTRO
# procmail-3.03/SmartList/Manual
# procmail-3.03/SmartList/bin/arch_retrieve
# procmail-3.03/SmartList/bin/createlist
# procmail-3.03/SmartList/etc/unsubscribe.txt
# Wrapped by kent@sparky on Tue Jul 5 21:10:30 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 2 (of 5)."'
if test -f 'procmail-3.03/SmartList/INTRO' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'procmail-3.03/SmartList/INTRO'\"
else
echo shar: Extracting \"'procmail-3.03/SmartList/INTRO'\" \(9413 characters\)
sed "s/^X//" >'procmail-3.03/SmartList/INTRO' <<'END_OF_FILE'
X$Id: INTRO,v 1.8 1994/05/26 14:10:53 berg Exp $
X
X How to set up mailing lists
X ---------------------------
X
X Copyright (c) 1993-1994, Stephen R. van den Berg, The Netherlands.
X <berg@pool.informatik.rwth-aachen.de>
X
XThis document mainly describes a sendmail environment, much of it applies
Xto non-sendmail mail agents as well.
X
X
XContents:
X--------- 1. Intro
X 2. Bouncing mail
X 3. The disadvantages
X 4. How to circumvent these disadvantages
X 5. Why use procmail to filter the mailinglist mail?
X 6. How do I use procmail to filter the mailinglist mail?
X
X1. Intro
X -----
X
XThe simplest and most direct way to setup a mailinglist is by inserting a line
Xin the /usr/lib/aliases file looking like:
X
Xmylist: fred,john, wilma, barney@bedrock, pebbles
X
XNow all the mail arriving at your machine for "mylist" (either local or
Xmylist@your.domain) will be automatically forwarded to all the mentioned
Xaddresses (fred, john, etc.).
X
XThe address mylist@your.domain is intended for submissions to the list that
Xare supposed to be forwarded to all the subscribers. For the administrative
Xtasks like removals from the list, new subscriptions to the list, or address
Xchanges of subscribers, it is common practice to create a second entry in the
X/usr/lib/aliases file:
X
Xmylist-request: your_login_name@your.domain
X
X
X2. Bouncing mail
X -------------
X
XIn order to deal with bouncing mail gracefully, an extra precaution should
Xbe taken. If for example mail to wilma bounces (user non-existent, mail
Xfilesystem full, etc.), it will bounce back to the original sender.
XNow, the only person that should be concerned with distribution failures
Xshould be the mylist-request holder. Therefore you should be using a
Xsendmail special alias like:
X
Xowner-mylist: mylist-request@your.domain
X
XThis way local mail will bounce back to mylist-request@your.domain.
X
X
X3. The disadvantages
X -----------------
X
XIf you are using the above methods, some obvious disadvantages come to mind
Xhowever:
X
Xa. The subscriber list cannot exceed 1000 bytes (on many sendmails).
Xb. The subscriber list cannot be changed on-the-fly (/usr/lib/aliases needs
X to be edited, and newaliases has to be run).
Xc. People cannot be prevented from submitting messages like "Please remove
X me from this mailinglist" to mylist (and thereby annoying all subscribers).
Xd. People cannot be guarded from themselves in case they insert
X "Return-Receipt-To:" fields in their headers (if they are particularly
X unlucky, they will receive an acknowledge mail from *every* subscriber's
X sendmail).
Xe. People including "Errors-To:" or "Sender:" fields can cause the bounce
X messages to bypass owner-mylist anyway.
Xf. There is no way of limiting the number of submitters, i.e. every person
X who knows the name of the mailing list and who can send mail to your.domain
X is able to submit messages to the list. This means, for example, that you
X cannot limit a mailing list to local users (i.e. only local users can
X submit).
Xg. You are unable to insert a "Reply-To: mylist@your.domain" in case you
X would want to (this makes replying to the list easier, too easy as some
X people say).
X
X
X4. How to circumvent these disadvantages
X -------------------------------------
X
Xa. Can be circumvented by using nested aliases like:
X mylist: mylist1, mylist2
X mylist1: fred,john
X mylist2: wilma,barney@bedrock,pebbles
X This can however, become extremely messy to maintain.
X
Xb. This can be avoided if you use aliases like:
X mylist: :include:/path/to/the/memberfile
X The memberfile should contain:
X fred,john,wilma,barney@bedrock,pebbles
X This will also take care of the upper limit on aliases expansions and
X newaliases need not be run again every time you change the file.
X
Xc. Can only be taken care of by using a mailfilter like procmail.
X
Xd. Can only be taken care of by using a mailfilter like procmail.
X
Xe. Can only be taken care of by using a mailfilter like procmail.
X
Xf. Can only be taken care of by using a mailfilter like procmail.
X
Xg. Can only be taken care of by using a mailfilter like procmail.
X
X
X5. Why use procmail to filter the mailinglist mail?
X ------------------------------------------------
X
XInstead of using a mailfilter you could also take care of most of the problems
Xthree till seven by editing the sendmail.cf file. I would strongly recommend
Xagainst this approach however, since this will be too much of a customising
Xoperation and surely will not be a trivial task (in all cases). As a general
Xrule: don't mess with a sendmail.cf file once it works :-).
X
XNow, you could, instead of procmail, simply use immediate VNIX commands
Xlike grep, sed or awk to do the mail filtering. Again, there are some obvious
Xdisadvantages with this approach:
X
XA. In case any system resources go out (no more file descriptors, no more
X swap space, process table full, file system full (for temporary files))
X your awk or shell script will fail generously (i.e. several bad things
X could happen: mail munged, truncated, lost, hanging awk or sh programs,
X etc., you get the picture).
X
XB. All mail headers (including From: and Reply-To:) could very well be
X multi-line headers; it will be very difficult to make it understandable
X to awk that somehow the header line could continue on the next line
X (in case you want to remove a header, or do some complicated substitution).
X
XC. Another hairy problem will be determining the end of the header, of course
X that is solvable, but you have to make some extra precautions in your
X awk script to ensure that any substitutions/changes will not occur in
X the body of the message (further degrading performance and increasing the
X load on your machine).
X
XD. Starting programs directly from within aliases or .forward files can get
X extremely messy, since the environment the program starts in is
X potentially hostile.
X
XProcmail does not *directly* allow you to change any headers, but that
Xfeature is not really necessary since you can tell procmail to send ONLY the
Xheader through some filter of your choice.
X
XTo comment on the previously mentioned three disadvantages:
X
XA. Procmail takes care of that. Should the filter have problems anyway,
X procmail will graciously notice that the filter was in some kind of
X trouble, and will try something else with the original unmunged mail
X (you can specify what it should do of course, obvious choices: try
X the same filter again, drop the mail in a file and send you a notice,
X forward the mail to you instead (unfiltered), etc.)
X
XB. In order to make consistent scanning of the header possible using the
X egrep regular expressions built in to procmail, procmail will internally
X concatenate any headers that were continued according to the RCF 822
X recommendations, in order for external filters to benefit from this, you
X would use the formail program to pre-filter the mail.
X
XC. Procmail can be told to send the header, the body or both through the
X filter, hence your filter need not watch out to avoid doing any
X substitutions in the body, and the filter can therefore be a lot simpler.
X
XD. Procmail makes no assumptions about the environment it is started in, it
X assumes that everything is hostile and fights its way back to the
X civilised world by initialising *everything* to sane and expected default
X values. Thereby providing a warm bed for any program started from within
X procmail.
X
XBut procmail has some additional advantages as well:
X
X -- It will probably all go a bit faster, since only the header of the mail
X is being piped through the filter. Also, procmail reads in the mail in
X 16KB chunks, not line by line as sed does.
X
X -- You could use procmail to filter out any messages to the normal mailing
X list that should have gone to the mylist-request and remail them to
X mylist-request.
X
XWell, anyway, as you see, procmail does not give you everything you would want,
Xbut this was intentional in accordance to the true VNIX spirit (modularity).
XWhat procmail does provide is a *very* reliable hook (you might say it
Xprovides an anchor :-) for any mail processing you might do. For the more
Xcomplex things you still have to use shell scripts or call other programs
Xfrom within procmail, but then again, that saves you from learning any
Xparticular syntax procmail would have had to do the same.
X
XAs it happens, the accompanying formail program is able to cater to most
X(if not all) of your needs regarding mail munging.
X
X
X6. How do I use procmail to filter the mailinglist mail?
X -----------------------------------------------------
X
XIn order to cater for most wishes regarding mailinglist setup, I took the
Xliberty to write some rcfiles for procmail that can readily be used to create
Xany number of mailinglists in a comfortable and simple way. They are
Xcalled the "SmartList" mailinglist package.
X
XSee the FEATURES file in this directory for more information on what
Xthe SmartList mailinglist scripts will do for you.
X
XIf the scripts do not exactly do what you would have liked, you are invited to
Xedit them to taste. Perhaps you could send your changes to the SmartList
Xmailinglist if you feel that they could be useful to others.
X
XTo get started I suggest you read the INSTALL file in this directory.
X
XFor operating instructions you should read the Manual file in this directory.
X
X
XP.S. Any suggestions/corrections/improvements on this document are welcome.
END_OF_FILE
if test 9413 -ne `wc -c <'procmail-3.03/SmartList/INTRO'`; then
echo shar: \"'procmail-3.03/SmartList/INTRO'\" unpacked with wrong size!
fi
# end of 'procmail-3.03/SmartList/INTRO'
fi
if test -f 'procmail-3.03/SmartList/Manual' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'procmail-3.03/SmartList/Manual'\"
else
echo shar: Extracting \"'procmail-3.03/SmartList/Manual'\" \(27452 characters\)
sed "s/^X//" >'procmail-3.03/SmartList/Manual' <<'END_OF_FILE'
X SmartList mailinglist management
X --------------------------------
X
X Copyright (c) 1993-1994, Stephen R. van den Berg, The Netherlands.
X <berg@pool.informatik.rwth-aachen.de>
X
XNOTE: Run "flist -v" to find out more about your installed version of
X SmartList.
X
XContents:
X--------- 1. Creating and removing mailinglists or archive servers
X 2. Remote maintenance of mailinglists
X 3. Customisation
X 3a.Digest processing
X 3b.Restricting subscriptions
X 3c.Restricting submissions
X 3d.Auto subscription on first submission
X 3e.Autosending files to new subscribers
X 3f.Moderated lists
X 3g.List of lists
X 3h.Positively discriminate certain daemons
X 3i.Default help text replies
X 3j.Unsubscribe assistance
X 3k.Schematic overview of what goes on behind the scenes
X 4. The archive server
X 5. The format of the dist file
X 6. Multigram and the thresholds in rc.init/rc.custom
X 7. Choplist & sendmail
X 8. FTP addresses & the SmartList mailinglist
X
X$Id: Manual,v 1.36 1994/06/22 19:05:07 berg Exp $
X
X
X1. Creating and removing mailinglists or archive servers
X -----------------------------------------------------
X
XMake sure that the .bin directory is in your PATH. Now you can issue
Xcommands like:
X
X createlist testing
X createlist testing joe@somewhere.edu
X createlist -a testing joe@somewhere.edu
X removelist testing
X
XThe first command creates a mailinglist with two useful addresses:
X
X testing
X testing-request
X
XThe second command does the same, but it also specifies joe@somewhere.edu
Xto be the responsible contact person for this list.
X
XThe third command does the same, except instead of creating a mailinglist,
Xit creates an archive server.
X
XThe fourth command removes all traces of the "testing" mailinglist again.
X
XThere are three other convenience-utilitis that can be used:
X delink
X It will unlink a file from its hardlinked counterpart(s)
X (without deleting it).
X showlink
X It will display what groups of files are linked together.
X donatelist
X It will put a list under complete and exclusive control
X of the maintainer (a local user). See below.
X
XIf you are running several lists maintained by separate maintainers, you
Xcan give a maintainer complete and sole control over his or her own list
Xwithout the need for them to have user list or group list rights.
XFor this to work, you simply have to "donatelist the_maintainer his_list"
Xthe whole tree that contains his list to him (her). Make sure that the
Xgroup id of all necessary files in the tree are still group-writable by
X"list", because that's the access privilege the mailinglist will be running
Xunder.
X
XThe maintainer has to be careful to use an umask of 007 while editing in
Xhis mailinglist directory. This allows the mailinglist-programs to function
Xwhile still limiting access to all mailinglist files to *one* person only
X(the maintainer).
X
X
X2. Remote maintenance of mailinglists
X ----------------------------------
X
XTo facilitate remote maintenance of some mailinglists by their maintainers
XI have created the .bin/x_command script. It parses mails sent to the
X-request address and can execute some administrative commands.
X
XThe mail should be sent to the -request address of a mailinglist and
Xshould contain a field in the header looking like this:
X
XX-Command: joe@somewhere.edu password command
X
X"command" can be anything of the following:
X
X subscribe mailaddress
X unsubscribe mailaddress
X checkdist mailaddress To multigram-match mailaddress to
X the list (showing the eight best
X matches)
X showdist To list the distfile
X showlog To list the log
X wipelog To clear the log
X help To show this command summary
X info Ditto
X
XThe exact fieldname defaults to "X-Command", but can be customised to
Xwhatever you want.
X
XThe password defaults to "password", but can/should be changed.
X
XThe "joe@somewhere.edu" is always the mail address of the maintainer. Note
Xthat this has to match what was specified on the command line of
X"createlist" when the list was created.
X
XNote that the X-Command: field has to be part of the header, when it's
Xin the body of the mail, it has no effect.
X
XAnytime an X-Command: mail has been processed, the results will be
Xmailed back to the maintainer of the list, and the X-Command: field
Xwill have been renamed to X-Processed:.
X
XAlthough this remote-facility is convenient, some might argue that it
Xpresents a security hole. Well, in order to make this hole as small as
Xpossible, you can keep the password secret. Also, the exact mailaddress
Xof the maintainer might not be publicly known. You can simply change
Xthe X-Command field into something else like X-MyCommand. Above all, since
Xfaking mail is a well known possibility it would be ridiculous to take
Xmore precautions than these. Besides, if someone indeed manages to sneek in
Xa bogus X-Command:, it will never go unnoticed since the mailing list
Xmaintainer (and only the maintainer) will always receive the X-Processed:
Xmail.
X
XFor your convenience, a sample script "doxcommand" is present in the
XSmartList/examples directory. It can be used to easily generate these
XX-Command mails. Do remember to read-protect this script once the password
Xhas been changed.
X
X
X3. Customisation
X -------------
X
XThe mailinglists can be customised in several ways:
X
X- For all the lists:
X - Since all the lists initially share the same help.txt, subscribe.txt,
X unsubscribe.txt, rc.init, rc.submit and rc.request files
X (hardlinked), any change to them will affect all lists.
X - Since all the lists have the .bin directory in their PATH, any
X change to one of the Bourne shell scripts in there will affect
X them all.
X- Per list:
X - Every list directory contains an "rc.custom" rcfile which can
X be edited to your hearts content to customise certain parameters
X for this list only.
X - Small local customisations can be realised by uncommenting one
X or more of the RC_LOCAL_* assignments in rc.custom.
X You then have to create the appropriate rc.local* file in which
X you can put any commands you'd like (e.g. adding a general signature
X or disclaimer to every outgoing submission).
X - For graver customisation you can remove the hardlink (using
X .bin/delink for example) to any of the files in a list directory and
X provide that list with its own copy in order to edit that to taste.
X - Since the current directory is in the PATH before the .bin
X directory you can create per-list copies of any of the Bourne shell
X scripts in .bin which can then be changed without affecting the
X other lists.
X- Per group of lists:
X - The same applies as when customising per list, but you should
X then hardlink the appropriate files among the group of list
X directories.
X
XIf you are not using the remote-maintenance facility and you start editing
Xor customising scripts/files by hand, then you should make sure that there
Xdoesn't arrive any mail to those lists that are affected by your changes.
X
XIf you are editing while the system is running you can temporarily put
Xincoming mails on hold; you can do this:
X
X- for all the lists by creating the file: .etc/rc.lock
X- only for one list by creating the file: rc.lock
X in the list directory of that list.
X
XThe .bin/flist command checks to see if these rc.lock files exist AND are
Xnot older than 17 minutes before delivering the mail. So, if you create
Xan rc.lock file, mails to that (or all) lists will stall for the next
X17 minutes. If you need more time, touch the file every so often.
XYou should remove the rc.lock files again after finishing your editing.
X
XIf you would like to change the -dist alias (used to distribute the
Xmail to the subscribers) into something less well known, go right ahead,
Xbut remember to change the corresponding assignment to listdist. For
Xcompleteness sake one should also correct the createlist and removelist
Xscripts in that case. If you are using chopdist to expand the dist-file,
Xthen you don't even need a -dist alias at all.
X
X
X3a.Digest processing
X -----------------
X
XYou can configure a list to send out digests of accumulated submissions.
XIn order to do so, simply uncomment the appropriate assignment to
Xdigest_flag in rc.init (if you want all lists to be digested) or rc.custom
X(if you only want this list to be digested). Digests are then sent out
Xevery so often depending on size and age of the accumulated messages.
X
XThe conditions for sending out a digest are checked during the arrival
Xof every submission. If, however, traffic on the list sometimes is very low
X(i.e. less often than the maximum age of a digest) a digest could be laying
Xaround for longer than the specified maximum period (3 days by default).
X
XIn order to make sure that the digest gets sent out anyway, you should be
Xrunning the .bin/cronlist program every so often. The recommended
Xprocedure is to create a cron job (under the list account) that contains
Xsomething like the following entry:
X
X0 6 * * * /home/list/.bin/cronlist
X
XThe cronlist script can be customised to taste (maybe you'll need to
Xadjust the setting of the PATH variable).
XBeware: call cronlist with an absolute or relative path, do not rely on
XPATH to find it for you (cronlist uses $0 to find the location of the
Xlists it is responsible for).
X
XBy default, cronlist will run the flush_digests program.
XBy using the above listed crontab entry, you will ensure that at six o'clock
Xin the morning all the overdue digests will be sent out.
X
XFlush_digests normally checks the age of the digest and does not send it
Xout until it is overdue. If you want to force flush_digests to send out
Xa digest of a particular list, you can create the file ".digest.force" in
Xthat list's directory. During the next run of flush_digests, it will
Xremove .digest.force and push out the digest (if any) regardless of its age.
X
XIf you create a file named digest.admin in either the main directory of
Xthe digested list or in the archive/latest directory belonging to it, it
Xwill be picked up by the next flush_digests and included up front to the
Xactual digest under the heading "Administrivia".
XThe archive/latest/digest.admin file digested list will be automatically
Xremoved after the digest has been pushed out.
XThe digest.admin file in the main directory of the digested list will not be
Xremoved and is included in every digest.
X
XIf you want to give your subscribers the choice of receiving digests or not.
XThis is what you can do:
X
X Create two lists. E.g. if your list would be called "thelist", then
X you have the `real' list called "thelist" (created and used like
X a regular list) and the `digested' list called "thelist-d".
X
X In the distfile of thelist you should include thelist-d as one of
X the subscribers. In the rc.custom file of thelist-d you should
X edit the assignment to undigested_list to read
X "undigested_list = thelist@$domain".
X
X After you've done this, you're all set. People that want digests
X simply subscribe to thelist-d and people that don't, subscribe to
X thelist.
X
X
X3b.Restricting subscriptions
X -------------------------
X
XThere are three ways in which you can restrict who can subscribe to a list:
X- You can put the addresses of unwanted subscribers on the so-called reject-
X list (the `reject'-file).
X- You can create a program (e.g. a shell script) called "subscreen". It must
X be executable and will receive the mail address of the prospective subscriber
X as the first argument. If subscription for that address is allowed, the
X program must return with exitcode zero. If subscription is disallowed,
X simply return with exitcode one. A sample program is provided in the
X examples directory.
X- You can completely disable automatic subscription by uncommenting the
X appropriate "auto_subscribe" line in rc.custom.
X
X
X3c.Restricting submissions
X -----------------------
X
XYou can restrict submissions to people on the accept-list (the `accept'-file).
XMail from anyone else will be passed on to the maintainer instead of being
Xsubmitted. To enable this you have to uncomment the appropriate
X"foreign_submit" line in rc.custom. By default the accept file is hardlinked
Xto the dist file (i.e. if submissions are restricted, only subcsribers
Xcan do so). If you want to allow only an even more select group, delink the
Xaccept file and edit it to taste.
X
XBeware that using an accept file is incompatible with having an owner- alias
Xfor this list (procmail administered lists do not need the owner- alias
Xanyway).
X
XIf, in addition to notifying the maintainer you want an automated reply
Xto be generated to the submitter which was not in the accept file, then you
Xcan accomplish this by simply creating an accept.txt file. Its contents
Xwill (like the contents of the help.txt file) be returned to the submitter.
X
XThis feature is not the same as a moderated list, the two features can be
Xused accumulatively.
X
X
X3d.Auto subscription on first submission
X -------------------------------------
X
XInstead of rejecting submissions by people not on the accept (dist) list,
Xyou can enable "force_subscribe". This will cause people submitting
Xmails to the list to be autosubscribed to the list if they were not in the
Xdist file.
X
X
X3e.Autosending files to new subscribers
X ------------------------------------
X
XYou can create a file named "subscribe.files". It can contain any
Xnumber of archive-server commands. The results (i.e. the files requested)
Xwill be sent to the new subscriber.
X
X
X3f.Moderated lists
X ---------------
X
XFirst create a file named "moderators", it should contain the fully
Xqualified mail addresses of all the moderators for this list (i.e. just
Xlocal usernames are not sufficient, at least include an @host or host! ).
XThen uncomment the appropriate "moderated_flag" line in rc.custom.
X
XFrom then on all mail that does not contain an
X"Approved: the_address_of_one_of_the_moderators" field is forwarded to
Xall the moderators.
X
XOne of the moderators should then resend the mail to the list after adding
Xan "Approved: his_own_address" field to the header (and possible editing
Xthe contents of the mail). It will be no problem if several moderators
Xresubmit the same submission concurrently, since the mailinglist will
Xfilter out duplicates anyway (i.e. only the first one will go out and
Xbe archived).
X
X
X3g.List of lists
X -------------
X
XIf you want people to be able to get an overview of which lists are
Xpublicly available at your site, you can have your listmaintainers create
Xa file called "info.txt" in their respective list directory. This info.txt
Xfile should contain a short description of the purpose and main topic of
Xthis particular list.
X
XYou can then setup a command like examples/gatherinfo in crontab to collect
Xall these various info.txt files once a day.
X
XThe thus gathered info.txt files can be placed in a directory which can
Xbe accessed by a gopher or ftp server, or, you can put them into the
Xarchive directory of a procmail-managed mail-archive server (e.g. under
Xthe mail-alias "metalist").
X
X
X3h.Positively discriminate certain daemons
X ---------------------------------------
X
XSmartList usually does not accept submissions or subscriptions from daemons.
XIf you'd like to make an exception for some, you can do this by tuning
Xthe daemon_bias variable. A sample template can be found in the rc.init
Xfile. This variable can of course be set in the rc.init, rc.custom or
Xrc.local files. Instead of directly specifying a weight and a regexp, you
Xcan just specify a weight. You'll then have to make sure that the variable
Xis set only when mail from your special daemons arrives.
X
X
X3i.Default help text replies
X -------------------------
X
XBy uncommenting the appropriate "auto_help" line in the rc.custom file the
Xlist will respond to every undecipherable request message as if it requested
Xhelp. Messages that will still get through to the maintainer are those:
X- that seem to come from a daemon.
X- which look like a reply.
X
XDepending on the typical audience you have on the list, enabling this might
Xnot be a good idea.
X
X
X3j.Unsubscribe assistance
X ----------------------
X
XBy uncommenting the appropriate "unsub_assist" line in the rc.custom file
Xyou can turn on the unsubscribe assistance. If the someone is trying to
Xunsubscribe from the list, but his mailaddress could not be found, he
Xwill receive back a number of multigram matches (determined by the value
Xof unsub_assist) between his unsubscribe message and the dist file.
X
XIf you'd like to enable this feature, please keep the following points
Xin mind:
X- People can get excerpts of the dist file this way.
X- Malevolent individuals might become encouraged to unsubscribe lots
X of people from your list. This will not go by unnoticed, of course.
X It will be logged and the innocent subscribers will receive a copy
X of the unsubscribe request they didn't send. Nevertheless, it can cause
X considerable inconvenience.
X
X
X3k.Schematic overview of what goes on behind the scenes
X ----------------------------------------------------
X
XSuppose you have two entries in the aliases file, one for thelist@domain
Xand one for thelist-request@domain.
X
XWhenever mail arrives for either address, the following happens:
X - flist is started suid root with thelist as its argument
X - changes its current directory to that of the (internally
X hardcoded) main list directory
X - changes its uid and gid to that of the (internally
X hardcoded) list account
X - changes its current directory to that of thelist
X - waits until both ../.etc/rc.lock and rc.lock are gone or
X are old enough (17 minutes)
X
XThen, if it was a regular submission to thelist@domain:
X - flist execs procmail with rcfile rc.submit
X - pulls in rc.init that sets up the defaults
X - pulls in rc.custom that overrides some defaults (if any)
X - checks the submission format
X - if needed it now checks:
X - the accept list
X - the moderators list (Approved:)
X - checks the msgid cache for duplicate submissions
X - if needed does digest processing (and stop)
X - archives the mail
X - munges the header of the mail to taste
X - fires off sendmail to send the mail to thelist-dist@domain
X - If the mail was an administrative request, it does not get
X passed on to the list, instead, procmail pulls in rc.request
X
XBut, if it was an administrative mail for thelist-request@domain:
X - flist execs procmail with rcfile rc.request
X - pulls in rc.init that sets up the defaults
X - pulls in rc.custom that overrides some defaults (if any)
X - performs the necessary actions, depending on the content
X - if the content was undecipherable, it gets passed on to
X the maintainer of thelist
X
XIf there are grave system failures during all this, the catch-all script
Xrc.post will kick in and make sure that the mail is stashed away somewhere
Xor forwarded to the maintainer, whatever works. This to ensure that no
Xmail gets lost.
X
X
X4. The archive server
X ------------------
X
XAll mail (except mail being forwarded from another mailinglist) sent to any
Xof the lists is archived. The archiving is fairly straightforward.
XE.g. if you have a list called "scuba", then all submissions are archived
Xin scuba/archive/latest/. The mails will be stored one-mail-per-file each.
XThe files will be numbered.
X
XNow, normally, only the last two mails will be kept around, the others
Xare periodically removed. This in order to keep down the archiving costs
Xfor people with limited diskspace. To change the size of the archive-history
Xedit the rc.custom file. To get more sophisticated archiving, like grouping
Xsubmissions monthly, you should either create a cron job or edit the
X.bin/arch_trunc file.
X
XThe archive server can be accessed per mailinglist by sending mail
Xto the -request address with the following Subject:
X
X Subject: archive
X
XThe body of the mail or the rest of the subject line can then be
Xfiled with requests to the archive server. It basically understands
Xfive commands:
X
X get file ...
X ls directory ...
X egrep case_insensitive_regular_expression file ...
X maxfiles nnn
X help
X
XThe archive server does a thorough check on the commands and the files
Xthat are requested. This to ensure that it does not access any files
Xoutside the "scuba/archive" directory. Any text-file that you put in
Xthe "scuba/archive" directory (or any of its subdirectories) can now be
Xretrieved by the archive commands.
X
XIf a file requested via the archive server starts with a header that begins
Xwith `Content-Type:', then the file is sent out as is, without encapsulation.
XThis allows you to prepare the files in special formats that are directly
Xsupported by the recipient's mailuser agent. The leading Content-Type: and
Xany immediately following fields will become part of the header.
X
XAll other files are MIME-encapsulated before transmission. You should take
Xa look at /home/list/.bin/mimencap.local if you want to extend or customise
Xthe recognised file types.
X
XThe MIME-encapsulation is automatic and depends on the availability of the
Xmetamail package in the PATH defined in rc.init. The programs from this
Xpackage which need to be available are: mimencode and splitmail.
XIf mimencode is not found on the PATH, the files will be sent out with a
Xstandard wrapper around them.
X
XIf you put links in the "scuba/archive" tree, you can allow the archive
Xserver to retrieve files from other parts of the filesystem.
X
XThe whole archive server can be found in the .bin/arch_retrieve script.
XThe archive server can be extended with arbitrary commands via the
Xexamples/retrieve.local script that comes with the distribution.
X
X
X5. The format of the dist file
X ---------------------------
X
XYou do not need to know this, unless you edit the dist file by hand or want
Xto incorporate an existing list of addresses.
X
XIn order to distribute incoming submissions the dist file is fed to sendmail
Xwith the regular :include: alias. So the format of this file must
Xbe in accordance with what sendmail would expect. In addition to that
Xthis file is searched and edited by multigram in order to find particular
Xsubscribers. The format which multigram expects is a bit more rigid than
Xwhat sendmail allows.
X
XThe following conditions apply:
X- One subscriber per line.
X- Empty lines are allowed.
X- The mail address of the subscriber must be the first word on the line.
X- Comments may follow the address (but separated from the address by
X at least one whitespace character).
X- Everything preceding the line containing:
X (Only addresses below this line can be automatically removed)
X is write protected from changes by multigram (i.e. these addresses can
X never be automatically/accidentally unsubscribed).
X- If the line:
X (Only addresses below this line can be automatically removed)
X is not present at all, automatic unsubscriptions to this list are impossible.
X- Whenever multigram automatically removes an address from the list, it
X rewrites the dist file `in situ'. This means that the dist file will be
X contracted at that point, any excess slack at the end will be overwritten
X by newlines (i.e. the dist file never shrinks, this because ANSI-C does not
X provide a truncate() command of some kind). I choose to write in situ in
X order to avoid copying the dist file every time it changes (a real life
X saver if the list grows too big).
X- Multigram always adds new subscribers on the line immediately following the
X last filled entry in the dist file.
X
XSome sample entries (the preferred format):
X joe@some.where
X joe@some.where (some comment)
X joe@some.where (some comment) (some more comments)
X
XDepreciated, but allowed:
X <joe@some.where>
X <joe@some.where> some comment
X <joe@some.where> (some comment)
X
XNot allowed by multigram (although sendmail doesn't mind):
X (some comment) joe@some.where
X some comment <joe@some.where>
X
X
X6. Multigram and the thresholds in rc.init/rc.custom
X -------------------------------------------------
X
XThe rc.init and rc.custom scripts define some threshold values:
X
X match_threshold, off_threshold, reject_threshold, submit_threshold.
X
XThese values are fed to multigram as a cut-off value with which to decide
Xif a certain mail address is on a list.
XThe higher the threshold, the better the match must be. The thresholds
Xhave a scale from -16383 to 32767. This means that, for instance a threshold
Xof 30730 can be used to find only mailaddresses that are almost verbatim
Xon the list. A value of 24476 on the other hand allows for some error
X(like mailaddresses munged by gateways etc.) in finding matches to the
Xlist.
X
XThe values 30730 and 24476 are somewhat arbitrary values which seem
Xto work well for the particular problems at hand.
X
XTo get a feeling for the values computed by multigram you can do
Xthe following test:
X
X Create a file with the same format as the distfile, fill it with
X any number of addresses you like (e.g. you could take an existing
X distfile).
X Now make a copy of this `distfile' and alter some of the addresses
X a bit (like omit one character, or add some gateway information,
X switch two words, change it into an uucp address, etc.).
X Next you should call up multigram with the following command line:
X
X multigram -l-16000 -b300 pseudo_distfile <altered_distfile
X
X Multigram will display up the 300 best matches it found after
X crossreferencing altered_distfile and pseudo_distfile.
X The output produced by multigram can be disected as follows:
X
X lineno. name1 goodness name2
X
X Lineno. and name1 refer to the line number in pseudo_distfile which
X contains the mailaddress name1. Goodness is the metric that
X corresponds to the aforementioned threshold values, and name2 is
X the matching mailaddress from altered_distfile (which is usually
X the incoming mail).
X
X Once you get the hang of it you can play around a bit with the
X entries in altered_distfile by mutilating them more and more in
X order to see what multigram makes of it (try inserting some non-
X existing addresses as well).
X
X
X7. Choplist & sendmail
X -------------------
X
XThere are two ways of distributing the message to the addresses listed
Xin the dist file: either directly through sendmail and the :include:
Xalias expansion, or indirectly, through choplist which does the
Xexpansion itself and calls up sendmail on suitable chunks.
X
XBy default, choplist takes care of the expansion, uncomment the appropriate
Xalt_sendmail environment variable in rc.init to revert to standard sendmail
Xexpansion.
X
XChoplist tries to make sure that even for big lists, the alias expansion
Xgoes as swiftly as possible and several sendmails will be delivering the
Xmail to the subscribers concurrently. The various limits that can be
Ximposed on this process can be tuned in the rc.init file.
X
XMost sendmails will do a worse job without choplist as a preprocessor.
X
XA side effect of using choplist as a preprocessor is that there is no need for
Xa -dist alias anymore.
X
X
X8. FTP addresses & the SmartList mailinglist
X -----------------------------------------
X
XA recent version can be picked up at various comp.sources.misc archives.
XThe latest version can be obtained directly from the ftp-archive at:
X
X ftp.informatik.rwth-aachen.de
X
Xas (g)zipped tar file: /pub/packages/procmail/SmartList.tar.gz
Xas compressed tar file: /pub/packages/procmail/SmartList.tar.Z
X
XThere exists a dedicated mailinglist for SmartList users, send your
Xsubscription requests to:
X
X SmartList-request@informatik.rwth-aachen.de
X
XFor procmail related questions not specific to the SmartList package
Xyou can also write to the procmail mailinglist, send your subscription
Xrequests to:
X
X procmail-request@informatik.rwth-aachen.de
END_OF_FILE
if test 27452 -ne `wc -c <'procmail-3.03/SmartList/Manual'`; then
echo shar: \"'procmail-3.03/SmartList/Manual'\" unpacked with wrong size!
fi
# end of 'procmail-3.03/SmartList/Manual'
fi
if test -f 'procmail-3.03/SmartList/bin/arch_retrieve' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'procmail-3.03/SmartList/bin/arch_retrieve'\"
else
echo shar: Extracting \"'procmail-3.03/SmartList/bin/arch_retrieve'\" \(7986 characters\)
sed "s/^X//" >'procmail-3.03/SmartList/bin/arch_retrieve' <<'END_OF_FILE'
X#! /bin/sh
X:
X#$Id: arch_retrieve,v 1.38 1994/06/17 16:41:06 berg Exp $
X
Xtest=test # /bin/test
Xexpr=expr # /bin/expr
Xecho=echo # /bin/echo
Xls=ls # /bin/ls
Xrm=rm # /bin/rm
Xsed=sed # /bin/sed
Xcat=cat # /bin/cat
Xegrep=egrep # /bin/egrep
Xnice=nice # /bin/nice
Xmimesend=mimesend # SedHomeDir/.bin/mimesend
Xsleep=sleep # /bin/sleep
Xmimencode=mimencode # /usr/local/bin/mimencode # metamail MIME package
Xformail=formail # /usr/local/bin/formail
X
X$test -z "$listaddr" &&
X $echo "Don't start this script directly, it is used in rc.request" && exit 64
X
Xbreakoff_search=512 # the maximum number of matches returned
Xbreakoff_ls=512 # the maximum number of files listed with ls
Xmaxfiles=16 # the maximum number of files returned (per
X # command), this can be overridden with
X # the "maxfiles nnn" command. Setting it
X # to zero will disable checking.
X
Xwaitsleep=1 # number of seconds to sleep between sending
X # off files (to limit the load increase)
X # Don't set this limit too high, or your list
X # might become unavailable for extended periods
X # of time (if lots of files are being
X # requested).
X # If queueing is enabled, this sleep period
X # will not be used between putting files in
X # the queue.
X
Xtmprequest=tmp.request
Xtmpfrom=tmp.from
X
Xarchivetxt=archive.txt # the helpfile
Xarchivedir=archive
X
Xstandalone=$1
X
Xfrom=`$echo "arch_retrieve:" \`$cat $tmpfrom\` requested`
X$cat /dev/null >$tmpfrom
X
Xcase "$X_ENVELOPE_TO" in
X *$list-request*) wrongaddress="" ;;
X *) wrongaddress="WARNING:
X Please try to use '$listreq'
X the next time when issuing archive server requests." ;;
Xesac
X
Xexport tmprequest archivedir wrongaddress # for mimesend
X
X#
X# Check if mimencode is available
X#
X
Xcase `( exec 2>&1; exec $mimencode -)` in
X Usage:*) ;;
X *) mimencode="";;
Xesac
X
X$formail -k -xSubject: |
X $sed -e '/^[^a-zA-Z ]/,$ d' -e 's/^[ ]*archive/ARCHIVE/' \
X -e 's/[ ]archive\/\/*/ /g' |
X ( oldwrongaddress="$wrongaddress"
X wrongaddress="WARNING:
X Please make sure to start the Subject: of requests to the archive-
X server with the word archive.${wrongaddress:+
X$wrongaddress}"
X sendhelp=""
X ILLEGAL=""
X while read line
X do
X set `cd $archivedir; $echo dummy $line`
X shift
X case "$1" in
X archive|ARCHIVE|archive:|ARCHIVE:) shift
X $test ! -z "$wrongaddress" && wrongaddress="$oldwrongaddress";;
X esac
X #
X # Now call up the local extension file (if any)...
X #
X if test -f retrieve.local
X then
X . retrieve.local
X elif test -f ../SedBinDir/retrieve.local
X then
X . ../SedBinDir/retrieve.local
X elif test -f ../.bin/retrieve.local
X then
X . ../.bin/retrieve.local
X fi
X #
X # The extension file should have used "set" to clear $1 and tell that
X # it has processed the current command
X #
X case "$1" in
X maxfiles|MAXFILES)
X maxfiles=$2 ;;
X send|sendme|get|getme|gimme|retrieve|mail|\
X SEND|SENDME|GET|GETME|GIMME|RETRIEVE|MAIL)
X shift
X if $expr $maxfiles = 0 \| $maxfiles \>= $# >/dev/null
X then
X while $test $# != 0
X do
X case "$1" in
X */../*|../*|*/..|..|[-/]*)
X $echo $from ILLEGAL "$1" >>$tmpfrom
X $test -z "$ILLEGAL" && ILLEGAL="$1";;
X *) $echo $from "$1" >>$tmpfrom
X if $test -z "$mimencode"
X then
X ( $formail -rt -I"Subject: archive retrieval: $1" \
X -i"From: $listreq" -A"X-Loop: $listaddr" \
X -i"Content-ID: <$1%$listreq>" \
X -I"Precedence: bulk" -X "" <$tmprequest
X $test ! -z "$wrongaddress" && $echo "$wrongaddress"
X cd $archivedir
X if $test -f "./$1"
X then
X case `$sed -e 1q <"./$1"` in
X Content-[Tt]ype:*) $cat "./$1" ;;
X *) $echo ""
X $echo "File: $1"
X $echo "BEGIN------------cut here-------------"
X $cat "./$1"
X $echo "END--------------cut here-------------"
X ;;
X esac
X else
X $echo ""
X if $test -d "./$1"
X then
X $echo "$1 is a directory, use 'ls' instead."
X else
X $echo "File $1 is currently not available."
X fi
X fi
X ) | $SENDMAIL $sendmailOPT $sendmailOPTq -t
X else
X $nice $mimesend "$1"
X fi
X ;;
X esac
X shift
X done
X else
X ( $formail -rt -I"Subject: archive retrieval: $line" \
X -i"From: $listreq" -A"X-Loop: $listaddr" \
X -I"Precedence: bulk" <$tmprequest
X $test ! -z "$wrongaddress" && $echo "$wrongaddress"
X $echo "Your request expanded to more than $maxfiles files."
X $echo "If you want to receive all of them, use the"
X $echo "'archive maxfiles $#' command first to raise the"
X $echo "limit."
X ) | $SENDMAIL $sendmailOPT -t
X fi
X $test -z "$sendmailOPTq" && $sleep $waitsleep ;;
X ls|dir|directory|list|show|\
X LS|DIR|DIRECTORY|LIST|SHOW)
X shift
X case "$*" in
X *[/\ ]..[/\ ]*|..[/\ ]*|*[/\ ]..|..|[-/]*|*\ /*)
X $echo $from ILLEGAL ls "$line" >>$tmpfrom
X $test -z "$ILLEGAL" && ILLEGAL="$line";;
X *)
X $echo $from ls "$line" >>$tmpfrom
X ( $formail -rt -I"Subject: archive retrieval: ls $1" \
X -i"From: $listreq" -A"X-Loop: $listaddr" \
X -i"Content-ID: <$line%$listreq>" \
X -I"Precedence: bulk" <$tmprequest
X $test ! -z "$wrongaddress" && $echo "$wrongaddress"
X cd $archivedir
X $echo "ls -l $line"
X $echo "BEGIN---------------cut here------------------"
X $ls -lL "$@" 2>&1 | $sed -e $breakoff_ls'a\
XTruncating after '$breakoff_ls' names...' -e ${breakoff_ls}q
X $echo "END-----------------cut here------------------"
X ) | $SENDMAIL $sendmailOPT -t
X $sleep $waitsleep ;;
X esac ;;
X search|grep|egrep|fgrep|find|\
X SEARCH|GREP|EGREP|FGREP|FIND)
X iflag="-i"; nflag="-n"; flags=""; ready=no
X while $test ! -z "$ready"
X do
X shift
X case "$1" in
X -i-) iflag="";;
X -n-) nflag="";;
X -[chlnv]) flags="$flags $1" ;;
X -?) ;; # skip unknown flags
X *) ready="" ;;
X esac
X done
X regxp="$1"
X shift
X case "$*" in
X *[/\ ]..[/\ ]*|..[/\ ]*|*[/\ ]..|..|[-/]*|*\ /*)
X $echo $from ILLEGAL "$line" >>$tmpfrom
X $test -z "$ILLEGAL" && ILLEGAL="$line";;
X *) $echo $from "$line" >>$tmpfrom
X ( $formail -rt -I"Subject: archive retrieval: $line" \
X -i"From: $listreq" -A"X-Loop: $listaddr" \
X -I"Precedence: bulk" <$tmprequest
X $test ! -z "$wrongaddress" && $echo "$wrongaddress"
X cd $archivedir
X $echo "$line"
X $echo "BEGIN---------------cut here------------------"
X $nice $egrep $nflag $iflag $flags -e $regxp $* \
X </dev/null 2>&1 | $sed -e $breakoff_search'a\
XTruncating after '$breakoff_search' matches...' -e ${breakoff_search}q
X $echo "END-----------------cut here------------------"
X ) | $SENDMAIL $sendmailOPT -t
X $sleep $waitsleep ;;
X esac ;;
X version|VERSION)
X ( $formail -rt -I"Subject: archive retrieval: $line" \
X -i"From: $listreq" -A"X-Loop: $listaddr" \
X <$tmprequest
X $test ! -z "$wrongaddress" && $echo "$wrongaddress"
X flist -v 2>&1 | sed -e "/^User:/,$ d"
X echo ""
X procmail -v 2>&1
X ) | $SENDMAIL $sendmailOPT -t
X $sleep $waitsleep ;;
X ""|\#*) ;;
X *) $test -z "$sendhelp" && sendhelp="$1" ;;
X esac
X done
X if $test ! -z "$sendhelp" -o ! -z "$ILLEGAL"
X then
X ( $formail -rt -I"Subject: archive retrieval info" \
X -i"From: $listreq" -A"X-Loop: $listaddr" -I"Precedence: bulk" \
X <$tmprequest
X $test ! -z "$wrongaddress" && $echo "$wrongaddress"
X case "X$sendhelp" in
X X[Hh][Ee][Ll][Pp]|X[Ii][Nn][Ff][Oo]|X) ;;
X *) $echo "Unknown command $sendhelp." ;;
X esac
X $test ! -z "$ILLEGAL" && $echo "Illegal filename $ILLEGAL requested."
X $echo ""
X $cat $archivetxt
X if $test ! -z "$standalone"
X then
X $echo ""
X $test -f help.txt && $cat help.txt
X $test -f info.txt && $cat info.txt
X fi
X ) | $SENDMAIL $sendmailOPT -t
X fi
X )
X
Xif $test ! -z "$archive_log"
Xthen
X $cat $tmpfrom >>$archive_log
Xfi
X
Xif $test ! -z "$sendmailQflush"
Xthen
X $sendmailQflush 2>/dev/null &
Xfi
END_OF_FILE
if test 7986 -ne `wc -c <'procmail-3.03/SmartList/bin/arch_retrieve'`; then
echo shar: \"'procmail-3.03/SmartList/bin/arch_retrieve'\" unpacked with wrong size!
fi
chmod +x 'procmail-3.03/SmartList/bin/arch_retrieve'
# end of 'procmail-3.03/SmartList/bin/arch_retrieve'
fi
if test -f 'procmail-3.03/SmartList/bin/createlist' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'procmail-3.03/SmartList/bin/createlist'\"
else
echo shar: Extracting \"'procmail-3.03/SmartList/bin/createlist'\" \(4981 characters\)
sed "s/^X//" >'procmail-3.03/SmartList/bin/createlist' <<'END_OF_FILE'
X#! /bin/sh
X: &&O='cd .' || exec /bin/sh "$0" $argv:q # we're in a csh, feed myself to sh
X$O || exec /bin/sh "$0" "$@" # we're in a buggy zsh
X#########################################################################
X# createlist To create mailinglists #
X# #
X# Created by S.R. van den Berg, The Netherlands #
X#########################################################################
X#$Id: createlist,v 1.30 1994/06/07 17:05:28 berg Exp $
X
Xdefaults=.etc
X
Xtest=test # /bin/test
Xln=ln # /bin/ln
Xtouch=touch # /bin/touch
Xmkdir=mkdir # /bin/mkdir
Xrmdir=rmdir # /bin/rmdir
Xsed=sed # /bin/sed
Xpwd=pwd # /bin/pwd
Xcat=cat # /bin/cat
Xrm=rm # /bin/rm
Xcp=cp # /bin/cp
Xls=ls # /bin/ls
Xchmod=chmod # /bin/chmod
Xecho=echo # /bin/echo
Xgrep=grep # /bin/grep
Xlockfile=lockfile # /usr/local/bin/lockfile
X
Xbin_procmail=SedBinDir/procmail
X
XDEVNULL=/dev/null
Xetcpasswd=/etc/passwd
XEX_USAGE=64
XEX_UNAVAILABLE=69
X
X( exec 2>$DEVNULL; lockfile )
Xif $test $? != 64
Xthen
X $echo "Where is \"lockfile\"? It should be installed in your PATH" 1>&2
X exit $EX_UNAVAILABLE
Xfi
X
Xif $test ! -d $defaults
Xthen
X if $test -d list
X then cd ./list
X else cd ..
X $test -d $defaults || cd ..
X fi
Xfi
Xif $test ! -d $defaults
Xthen
X $echo "createlist: You should be near the main list directory to do this" \
X 1>&2
X exit $EX_USAGE
Xfi
X
Xif $test ! -f $bin_procmail
Xthen
X OIFS="$IFS"
X IFS=:"$IFS"
X procmail=""
X
X for a in $PATH
X do $test -z "$procmail" -a -f "$a"/procmail && procmail=$a/procmail
X done
X
X IFS="$OIFS"
X if $test -z "$procmail"
X then
X $echo "Where is \"procmail\"?" 1>&2
X $echo "The symbolic link $bin_procmail must point to it" 1>&2
X exit $EX_UNAVAILABLE
X fi
X $rm -f $bin_procmail
X $ln -s $procmail $bin_procmail 2>$DEVNULL ||
X $ln $procmail $bin_procmail 2>$DEVNULL ||
X ( $cat >$bin_procmail <<HERE
X#! /bin/sh
X:
Xexec $procmail "\$@"
XHERE
X $chmod 0755 $bin_procmail
X )
Xfi
X
Xdomain=`$sed -n -e 's/^[^#]*domain= *\([^ ]*\).*$/\1/p' \
X $defaults/rc.init`
X
Xif $test .$domain = .INSERT.YOUR.MAIL.DOMAIN.HERE
Xthen
X $echo "I refuse to do anything useful until you have edited the" 1>&2
X $echo "rc.init file. \`domain' must be set to some sane value." 1>&2
X exit $EX_USAGE
Xfi
X
Xarchiveserver=no
X$test .-a = ".$1" && shift && archiveserver=yes
X
Xif $test $# != 1 -a $# != 2 -o ".$1" = .-h
Xthen
X $echo "Usage: createlist [-a] listname [maintainer]" 1>&2
X $echo " -a create an archive server instead of a list" 1>&2
X exit $EX_USAGE
Xfi
X
Xlist="$1"
Xmaintainer="$2"
X
Xcase "$list" in
X *[+*?]*) $echo "createlist: This listname contains magic characters" 1>&2
X $echo "createlist: Support for this is planned, ask on the SmartList" 1>&2
X $echo "createlist: mailinglist for more details" 1>&2
X exit $EX_USAGE;;
X "*[/ ]*") $echo "createlist: Suspicious listname specified" 1>&2
X exit $EX_USAGE;;
X *[@!]*) $echo "createlist: Specify listname without domain name appended" \
X 1>&2; exit $EX_USAGE;;
Xesac
X
Xif $grep -i -e "^$list:" $etcpasswd >$DEVNULL
Xthen
X $echo "createlist: You can't pick a listname equal to an existing username" \
X 1>&2; exit $EX_USAGE
Xfi
X
Xumask `$sed -n -e 's/^[^#]*UMASK=[^0-9]*\([0-9]*\).*$/\1/p' $defaults/rc.init`
X
X$chmod go+x . .bin $defaults # to preserve sanity
X
Xif $mkdir "$list" 2>$DEVNULL
Xthen
X $chmod g+s "$list" 2>$DEVNULL # to ensure the gid is inherited
Xelse $echo "createlist: \"$list\" already exists" 1>&2; exit $EX_USAGE
Xfi
Xcd "$list"
Xfor a in rc.submit rc.init rc.request help.txt subscribe.txt unsubscribe.txt \
X archive.txt reject
Xdo
X $test -f ../$defaults/$a || $touch ../$defaults/$a # make sure it exists
X $ln ../$defaults/$a $a
Xdone
X
X$mkdir archive
X$mkdir archive/latest
X
X$sed -e "/^maintainer/ s/=/= $maintainer/" <../$defaults/rc.custom \
X >rc.custom
X$echo "(Only addresses below this line can be automatically removed)" >>dist
X
X$chmod ugo+x .
X$chmod ugo+r dist
X
Xif $test $archiveserver = yes
Xthen
X $rmdir archive/latest
X $rm -f dist subscribe.txt unsubscribe.txt help.txt rc.submit rc.request
X $cat >rc.submit <<HERE
XHOST=continue_with_rc.request
XHERE
X $ln ../$defaults/rc.archive rc.request
Xelse
X $ln dist accept
Xfi
X
Xcd ..
X
X$echo 1>&2
X$echo "Installed the following files (many hardlinked):" 1>&2
X$echo 1>&2
X$ls -ld $list $list/* $list/*/* 1>&2 2>$DEVNULL
X$echo 1>&2
X
Xlistuser=`$ls -ld $defaults | ( read a b user d; $echo $user )`
X
XTMPF=.uniq.$$
X
Xlistdir=$HOME
X
Xtrap "$rm -f $TMPF" 1 2 3 15
X
X$touch $TMPF
Xtest -f $HOME/$TMPF || listdir=`$pwd`
X
X$rm -f $TMPF
Xtrap 1 2 3 15
X
Xflist=$listdir/SedBinDir/flist
X
X$echo "Now make the following entries in your /usr/lib/aliases file:" 1>&2
X$echo \########################################################################
X$echo "$list: \"|exec $flist $list\""
X$echo "$list-request: \"|exec $flist $list-request\""
X$test $archiveserver = no && $echo "$list-dist: :include:$listdir/$list/dist"
X$echo \########################################################################
X$echo "And make sure to run newaliases afterwards." 1>&2
END_OF_FILE
if test 4981 -ne `wc -c <'procmail-3.03/SmartList/bin/createlist'`; then
echo shar: \"'procmail-3.03/SmartList/bin/createlist'\" unpacked with wrong size!
fi
chmod +x 'procmail-3.03/SmartList/bin/createlist'
# end of 'procmail-3.03/SmartList/bin/createlist'
fi
if test -f 'procmail-3.03/SmartList/etc/unsubscribe.txt' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'procmail-3.03/SmartList/etc/unsubscribe.txt'\"
else
echo shar: Extracting \"'procmail-3.03/SmartList/etc/unsubscribe.txt'\" \(258 characters\)
sed "s/^X//" >'procmail-3.03/SmartList/etc/unsubscribe.txt' <<'END_OF_FILE'
XIf this wasn't your intention or you are having problems getting yourself
Xunsubscribed, reply to this mail now (quoting it entirely (for diagnostic
Xpurposes), and of course adding any comments you see fit).
X
XTranscript of unsubscription request follows:
X--
END_OF_FILE
if test 258 -ne `wc -c <'procmail-3.03/SmartList/etc/unsubscribe.txt'`; then
echo shar: \"'procmail-3.03/SmartList/etc/unsubscribe.txt'\" unpacked with wrong size!
fi
# end of 'procmail-3.03/SmartList/etc/unsubscribe.txt'
fi
echo shar: End of archive 2 \(of 5\).
cp /dev/null ark2isdone
MISSING=""
for I in 1 2 3 4 5 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 5 archives.
rm -f ark[1-9]isdone
else
echo You still must unpack the following archives:
echo " " ${MISSING}
fi
exit 0
exit 0 # Just in case...