[Top] [All Lists]

Re: how to filter a complete from domain

2001-06-06 05:48:28
At 13:29 2001-06-06 +0200, Marc Duivenvoorde wrote:
I'm trying to filter my email using procmail and I was wondering how to
filter a complete from domain. I've tried the following but it doesn't seem t

Have you considered setting VERBOSE=ON, and then checking the logs after a few test messages? This usually works wonders.

* ^TO_\/(marcd(_at_)ladot(_dot_)com)

Why are you using '\/' which is used to set $MATCH, which you are not making use of ?

Why are you enclosing the address in parenthesis, which is used to encapsulate OR'd strings, yet you are not OR'ing anything?

Does the mail folder exist (and why not use MAILDIR for the path spec?)?

* ^FROM_\/(.*

Same questions as above, but include:

Do you realize there is no "^FROM_" regexp macro (nor is there a ^FROM macro)? In effect, you are trying to match:


It is pretty much a given that THIS recipe isn't going to do what you're trying to accomplish. Methinks a VERBOSE logfile would have clued you into this mistake. There's a good chance you're confusing this with ^FROM_DAEMON and ^FROM_MAILER, and believing that ^TO and ^TO_ have counterparts, which they do not.

Arguably, a ^FROM macro that checks From:, From, Sender:, Resent-By:, etc, for an address could be useful from time to time, but the need (and standards of header use) is not nearly as clear cut as ^TO is.

 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

procmail mailing list

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