procmail
[Top] [All Lists]

RE: Duplicate mail using aliases

2004-10-09 13:01:16
From: Dallman Ross [mailto:dman(_at_)nomotek(_dot_)com] 

Okay.  I see now what he's doing with the -k and why he wanted
the -X's.  you're right, he does want them.  He's discarding all
headers except the ones specified.  Fine, this works for me
in testing, and I would hope it would work on Don's Solaris
server.  I see no reason for the "w" flag, so I took it out.
I certainly can see no use for a lockfile.

  :0
  * !^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: whomever"                  \
     -X "To:"                           \
     -A "X-Loop: xloop(_at_)mydom(_dot_)com"       \
     -X "X-Loop:"                       \
     | $SENDMAIL $SENDMAILFLAGS -t

Don, if that doesn't work, turn on your verbose logging and
send the log output, please.

I wanted to say, but forgot to, that I changed the -I to an -A
in the X-Loop line quite on purpose.  You don't want to
delete other people's X-Loops.  They're there for a reason. . . .

Also, for efficiency you could put your first condition third,
as it's not likely to trigger, and it's better to drop the
majority of messages that hit your server with the more
specific conditions first rather than have every single message
that doesn't have "X-Loop: xloop(_at_)mydomain(_dot_)com" run through that 
condition before getting excluded by the conditions that
follow.  Te difference will be microscopic, but, hey -- there's
no downside.

Also, you want to quote your dots in the conditions.

   * ^To:(_dot_)*admin(_at_)mydom\(_dot_)com

and so on.

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