procmail
[Top] [All Lists]

Re: procmail and qmail: "deliver to" issues

2002-09-04 16:56:45
From: jd <web(_at_)geek-chick(_dot_)com>

with a .procmailrc rule that looks like this:

  :0c:
  * ^Delivered-To:(_dot_)*username(_at_)(_dot_)*mydomain\(_dot_)net
  /path/username

and a message addressed to username(_at_)mydomain(_dot_)net, i would get 2 
copies --
1 in the "username" folder and 1 in my inbox.

i'm tearing my hair out here.  i've read tons of web sites, the procmail
man pages, qmail docs, etc...and cannot figure this out.  do i need to
make procmail ignore the first "Delivered-To" header?  is that possible?
is something messed up with the way the headers are added?

Going to the list-archive search engine lined to www.procmail.org
is often helpful.  Just a few days ago, for instance, I posted about
finding the bottommost Received: header.  The exact same technique
would apply to multiple Delivered-To: headers.

See
http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/2002-08/msg00507.html

Be aware that some sending SMTP servers add additional Delivered-To: headers.
I see two often, and I believe I have seen three before.  You might want a
different approach to finding the right one.  For example, suppose I
't want to consider only DT's pointing to example.com.  I could write:

        :0  # brackets contain a caret, space, and tab
        * ^Delivered-To:(.*\<)?\/[^     ]+(_at_)example\(_dot_)com
        *  MATCH ?? ^^\/[^(_at_)]+
        { DTLOCAL = $MATCH }

HTH,

-- 
dman

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>