procmail
[Top] [All Lists]

Re: procmail not matching

2002-06-08 12:05:10
At 11:27 2002-06-08 -0700, Jim Gifford did say:
Here is the To line from the Actual E-mail.
To: giffordj(_at_)linkline(_dot_)com, gifford_jim(_at_)yahoo(_dot_)com

procmail: No match on "^To: *gifford_jim(_at_)yahoo(_dot_)com"

Carefully evaluate the expression: '*' is "zero or more of the preceeding character. So:

        To:gifford_jim(_at_)yahoo(_dot_)com
        To: gifford_jim(_at_)yahoo(_dot_)com
        To:                            gifford_jim(_at_)yahoo(_dot_)com

all would match.  However,

        To: giffordj(_at_)linkline(_dot_)com, gifford_jim(_at_)yahoo(_dot_)com

would not, because that "giffordj(_at_)linkline(_dot_)com," bit ain't comprised 
of spaces.

Instead, use:

* ^TO_someaddress(_at_)domain\(_dot_)tld

or, if you must:

* ^To:.*\<someaddress(_at_)domain\(_dot_)tld

('\<' is a word-delimiter, NOT a literal bracket)

'.' is the wildcard for "any character".

[snip]

Uh, sorry, looks like lotsa old message text, and I'm not into re-reading list posts. The above addresses your matching problem. In fact, I'm fairly certain it was pointed out in a previous response.


You should realize as well that when there are multiple recipients to a single message (which in your case, will be separately retrieved copies of same), your FIRST match will catch them BOTH. Also, BCCs will prove to be your bane. Commit the procmail mantra to memory: "Procmail is not an MTA". There are kludges for this, but they generally require you to be administering the MTA so that you can insert additional headers. Your fetchmail (a separate utility unrelated to procmail insofar as support goes) config may has some mechanism for you to insert an identifier for the account which you retrieved the message from.

---
 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(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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