procmail
[Top] [All Lists]

Re: Simple procmail filter rule

2004-08-09 14:53:31
On Mon, Aug 09, 2004 at 03:09:04PM -0500, Christopher L. Barnard wrote:

This message is not being caught and I do not see why.  What (probably
painfully obvious) item am I forgetting?

------------8<------------

The procmail recipe:

:0 HB
* ^From: Mail Delivery Subsystem
* ^To: root\(_at_)pmoprod\(_dot_)admin\(_dot_)cbot\(_dot_)com
* ^Subject: Returned mail: User unknown
* 550
* User\ unknown
/home/cbar44/mail/garbage

-------------8<------------

A message comes along (this is a cut-and-paste from Pine, btw):

Well, as soon as you cut and paste, we lose any certainty about the
original.  My guess is that in cutting (probably more accurate: "copying")
and pasting, you are converting a tab to a space.  Your recipe expects
one space.  Any other whitespace combo won't match.

Also, you do want a lockfile, presuming "garbage" is an mbox-style
file.  And you do not need to quote the @ sign or the space after
"User" in the penultimate condition.

Finally, I recommend you find the messages from this group last week
discussing why it's a bad idea to use the "H" flag at the top of a
recipe.

-- 
dman

____________________________________________________________
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

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