At 11:57 2008-02-22 +1000, Troy Piggins wrote:
Been thinking about this some more. I was thinking I'd need to set up rules
for every user. But if I was to bcc some user I set up, say I named it
"outgoing-archiver" although it doesn't matter really, I could set up a
system-wide procmail rule like:
:0:
* ! ^TO_$LOGNAME
* ^From:.*$LOGNAME
| gzip -fc9 >> $HOME/Sent_$DATE.gz
Except that $LOGNAME is the shell login name of the user for which this
mail is being processed. If you're bcc'ing some user, LOGNAME is going to
be the account that mail is delivered for, not the user who originated the
message that was bcc'd.
Further, there's really no reason to have the mail run through the global
procmailrc -- the alias you bcc to can itself be a program delivery to
procmail. I don't use postfix, but in sendmail parlance, the alias would
be something like:
outgoing-archiver: "|/usr/bin/procmail -m
/etc/procmailrcs/outgoing-archiver.rc"
NO global procmailrc will be invoked.
I use this sort of invocation all the time to invoke procmail as a
front-end processor for a large number of majordomo listserves.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail