Hi,
I'm fairly new to Postfix recipes, so please forgive me if I've done
something silly.
I am wanting any mail to "user1" that originates from within my.domain.com
and doesn't contain the phrase "confidential" in the subject to be copied
to "user2". I have written a .procmailrc as below and it looks to work
most of the time.
The problem is that occasionally a message will be copied to "user2" that
originates from a completely different domain. This looks to happen with
I can't see any obvious pattern in which messages are copied - the From
address originate from many different domains. These messages all have
X-Original-To and X-Loop set to "user1(_at_)my(_dot_)domain(_dot_)com", so I
know procmail
is the culprit.
The user1 account is subscribed to several mailing lists and is
consequently rather high volume. Is there perhaps some issue with file
locking?
thanks,
Greg
PATH=$HOME/bin:/usr/bin:/usr/local/bin:.
MAILDIR=$HOME/Maildir # Need to make sure it exists
DEFAULT=$MAILDIR/
LOGFILE=$MAILDIR/procmailLog
LOCKFILE=$HOME/.lockmail
# Discard potential mail loops
:0
* ^X-Loop: user1(_at_)my\(_dot_)domain\(_dot_)com
/dev/null
:0
* ^FROM(_dot_)*[\(_dot_)(_at_)]my\(_dot_)domain\(_dot_)com
* ! ^SUBJECT.*confidential
{
:0 fwh
# Write loop header by piping through formail, to avoid mail loops
| formail -A "X-Loop: user1(_at_)my(_dot_)domain(_dot_)com"
:0 c
# Send a copy, then (c)ontinue processing actions
! user2(_at_)my(_dot_)domain(_dot_)com
:0:
# Send to default location (with a lockfile)
${DEFAULT}
}
____________________________________________________________
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