At 11:04 2009-10-14 +1000, Troy Piggins wrote:
[snip]
I'd like to do similar with the sent mail. I have set up postfix to
create a bcc mail of all mail originating from our domain name to
archiver(_at_)our(_dot_)domain(_dot_)name
Better then to just set up the archiver to be a program alias (i.e. pipe
directly to a procmail invocation). No need for procmail to check to see
if that address was a recipient - if the recipe in question is being run,
obviously it was...
* ^TO_(_dot_)*archiver(_at_)our\(_dot_)domain\(_dot_)name
This may or may not match, depending upon whether your MTA inserts the
address into the headers anyplace when it creates the BCC.
{
FROM_USERNAME=`formail -rt -xTo: \
| sed -e 's/[;\`\\]/ /g' \
| expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g' \
| cut -f 1 -d @`
wow. Local users won't ever mail out with different addresses?
BTW, you're aware that there will be issues for people who send mail via
SMTP which may not originate directly on your mailhost?
The mails do arrive in archiver's mbox, but they're not getting
copied to the sender's $HOME/Sent_0910.gz file.
So, what's your verbose logfile have to say about it?
Any ideas? Initially I thought it might be the TO_ macro doesn't
handle BCC, but reading man procmailrc I think it does.
Only if the address APPEARS in a BCC header. Generally speaking, the
header should never be present, except on mail being submitted to an MSA.
Have you examined the messages arriving at the archiver mbox?
---
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