procmail
[Top] [All Lists]

Re: Duplicate mail using aliases

2004-10-08 05:09:01
On Thu, Oct 07, 2004 at 08:46:17PM -0400, Don Woodward wrote:

I have the following /etc/procmailrc file below.  It works fine as is, but
if I replace the list of users "bhopkins, sharon, alan, mark, veronica,
ctaylor(_at_)anotherdom(_dot_)net" with an alias - "deadletter" - see below - 
from my
/etc/aliases file which has the same recipients, my recipients get two of
each message.

Why is this and is there any way to use my alias in /etc/aliases without
getting two of each message?

I prefer the list to be in an external file rather than in the procmailrc
file so that my boss can edit it easily.

-----------------------------------
/etc/procmailrc file below ...

# send mail through spamassassin
:0fw
| /usr/bin/spamc
#
#
#
# forward "ABCD dead_letter" subjects
:0cw:

I don't think you wanted that "c" flag.  That is probably why you
are "seeing double."

Perhaps you only notice it with the alias because your MTA normally
won't deliver two of the identical message?  Not sure.  Anyway, take
the "c" out and I'll bet your problem will vanish.

* !^X-Loop: xloop(_at_)mydom(_dot_)com
* ^Subject:.*ABCD dead_letter
* ^To:(_dot_)*admin(_at_)mydom(_dot_)com
| formail -k -X "From:" -X "Subject:" \
        -I "To: bhopkins, sharon, alan, mark, veronica,
ctaylor(_at_)anotherdom(_dot_)net" \
        -X "To:" \
        -I "X-Loop: xloop(_at_)mydom(_dot_)com" -X "X-Loop:" \
        | $SENDMAIL -oi -t


Regarding the external file,

    | formail [...] -I "To: `cat file`'

should work.

Dallman

____________________________________________________________
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