John T Ellis <ellis(_at_)cork(_dot_)cig(_dot_)mot(_dot_)com> writes:
Howdy. I'm receiving an error message from procmail that I don't
understand. I've looked through the man pages but do not see a
reference to it. Can anyone help?
Here's the situation. There is a mail alias called 'mcscmail' that is
defined in the mail.aliases map as:
mcscmail "| /usr/misc/bin/procmail -m /usr/test/mcsc/etc/procmailrc"
...
The procmailrc file is a simple few lines as follows:
LOGFILE=/usr/test/mcsc/etc/log
MAILDIR=/usr/test/mcsc/var/spool/mail/
SHELL=/bin/sh
VERBOSE=on
:0 c
mcscmail
:0
* ^Subject:.*update
updspool
:0
* ^Subject:.*open
opnspool
:0
* ^Subject:.*close
clsspool
The log output for my test mail is as follows:
procmail: [3630] Tue Mar 4 17:03:03 1997
procmail: Assigning "LASTFOLDER=mcscmail"
procmail: Opening "mcscmail"
procmail: Acquiring kernel-lock
procmail: No match on "^Subject:.*update"
procmail: No match on "^Subject:.*open"
procmail: No match on "^Subject:.*close"
From ellis(_at_)cork(_dot_)cig(_dot_)mot(_dot_)com Tue Mar 4 17:03:02
1997
Subject: test #4
Folder: **Bounced** 1117
...
When I send mail to 'mcscmail', the log file is updated as shown above. In
addition, the mail is deposited into the 'mcscmail' folder. However, the
original mail is bounced back to me as shown below.
I'd appreciate any pointers/comments on what the error is and how best to
fix it.
For some reason I can't seem to find it in the documentation anywhere,
but when you use the -m flag with procmail, DEFAULT and ORGMAIL will
both be unset. Therefore, if you fall off the bottom of the rc file,
the message will bounce unless you set DELIVERED to true.
The real question is, do you always want to deliver the message to
mcscmail, or only when it wasn't delivered elsewhere? If the former,
then just stick DELIVERED=true into your rcfile, probably right after
the recipe that delivers to mcscmail (good locality of mental
reference). If the latter, then move the recipe to the end of the rc
file and remove the 'c' flag from it. (Acually, you could even remove
it totally and just set DEFAULT to point to it.)
You know, this is first time I've ever seen a real use for the
DELIVERED variable. Wow.
Philip Guenther