procmail
[Top] [All Lists]

Re: rc recipe question

2004-03-15 15:33:42
Zhiliang Hu wrote:

I recently added a recipe to my procmailrc to filter out bad
subject mails:

 :0
 * ? formail -x"Subject:" | egrep -is -f /home/etc/black.subj
 JUNK

In my "black.subj" file I have only:
-----------------------------
On Sale
URGENT BUSINESS REQUEST
brides
Virus detected
get paid
Email Marketing
[GB2312]
-----------------------------

but it greedily matched several mails that does not contain that sort
of "Subject:" line at all!  I turned "verbose" on and indeed it was
this recipe that matched! ...  It is beyound me.  Could some expert
eyes see why?

Let's see ... do those messsages that shouldn't have been matched perhaps have a 1, a 2, a 3, a g, or a b in their subjects?

The last line in your pattern file is being treated as a pattern. Either use fgrep instead of egrep, or change the last entry to

\[GB2312]

And if JUNK is an mbox, your recipe needs a local lockfile.


_______________________________________________
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>