when I ran this recipe on my machine I got an error message:
Invalid regexp "Subject: *(Re: *)?archive *get *\/([^ ]+\)"
I'm uncertain what in this condition is not correct
At 10:56 AM 10/23/95 -0700, Alan Stebbens wrote:
I am setting up a system in which recipients of a mailing list will be
asked to retrieve a file using SmartList. Ideally I would like to be
able to send a mail saying 'just reply to this message without editing
the reply' in order to allow the users to easily retrieve the file
concerned. This would require some playing with the keywords used to
trigger sendmail - e.g. being able to cope with a subject line of
Subject: Re: archive get foo.bar
as well as allowing correct reply addresses.
Has anyone else actually done this?
You do not need to bother sendmail about this, except possibly to use an
You could even set this up using your own, personal address. Since
seeing is believing, send me an email with the subject: "send help"
(without the quotes).
Or, instead of using your own address, you could create an alias, with a
procmail recipe as the target of the recipe, using the '-m' option.
Here's an example of how to do this:
archive: "|/usr/local/bin/procmail -m /etc/procmailrcs/archive"
Set the ownership of "archive" to be the login which has proper read
access to the archive files.
The procmail recipe can be something like this:
# Set MAILDIR to where you wish the filter to operate out of
# **** Untested ****
* ^Subject: *(Re: *)?archive *get *\/([^ ]+\)
* !^X-Loop: archive(_at_)$HOST
# Keep a log of archive commands
| echo "`date` : $FROM : get $FILE" >> $ARCHIVELOG
# form a reply header
| formail -rt -I"From: Archive Daemon <archive>" \
-I"Precedence: low" \
-I"Subject: results of 'get $FILE'"
# Set this to the directory in which the files live
# If a plain name, is relative to $MAILDIR
# Make sure the file exists, and put it as the body
* test -f $FILESDIR/$FILE
| cat $FILESDIR/$FILE
# Report I/O errors
| echo "Sorry, there is a problem reading $FILE just now."
# Report when the file is missing
| echo "Sorry, $FILE is not currently available. Try again later."
# Now, send the results to the reply address
! -oi -t
# If sendmail fails, the mail will get sent to archive-owner, below
# Send unusual or looping mail to the archive owner