How would I go about creating a 'catchall' procmail recipe
that would mimic a MAILER-DAEMON message, as well as forward
a copy of the original to, say, a postmaster account on the
local server?
I wrote a quick something below which should cause your sendmail to
send a bounce message back to the originator, as well as forwarding a
copy to your local postmaster
All incomming mail gets filtered via the following system
wide procmailrc:
...
# Send to IMAP inbox
#
:0w:$CYUSER.lock
| tail +2 | $DELIVER -e -a $CYUSER -m user.$CYUSER
# if the above fails, notify sender and also
# bounce copy to postmaster
#
# ... ???
Here's how I'd start filling in the "... ???" part above:
# If we get here, it means the above failed.
EXITCODE=67 # EX_NOUSER -- addressee unknown
# sendmail should bounce it.
# Forward a copy to local postmaster (You may want to edit this!)
:0
| mail -s "mail for unknown user $CYUSER" postmaster(_at_)localhost
This URL explains a little about the EXITCODE thing:
http://www.procmail.org/jari/pm-tips-body.html#technical_matters
hth,
--
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information. Sorry.
Collin Park Not a statement of my employer.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail