procmail
[Top] [All Lists]

Re: fgrep problem...Im pulling my hair out.

2003-05-07 09:09:44
On Tue, May 06, 2003 at 06:07:26PM -0600, Linux wrote:

A sample /opt2/users/filters/${USER}_blocked_subjects contains:

badword1
badword2
etc

fgrep is reporting a match even for "non-badword".

If I run this command line, it works as designed.

procmail: Executing "fgrep,-isf,/opt2/users/filters/bfons_blocked_subjects"
procmail: Match on "fgrep -isf /opt2/users/filters/bfons_blocked_subjects"
procmail: Assigning
"LASTFOLDER=/var/log/SpamAss/Maildir/new/1052246176.4524_0.imap.domain.com"

Well, something is matching.  Do you have a line with just whitespace in
the file?

Take your recipe and put the fgrep output somewhere you can see it:


        :0
        * ? fgrep -isf blocked_subjects > bs.out
        { }

Whatever's in bs.out is what is matching.

Moreover, if you are looking for words in the Subject:, why do you
run the entire header set against the fgrep list?  How about
this, instead:

        :0:  # in brackets are a caret, a space, and a tab
        * ^Subject:.*\/[^       ].*
        * ? echo $MATCH | fgrep isf blocked_subjects
        spam


Btw, your other log stuff --


procmail: No match on "^Subject:.POTENTIAL SPAM*"
procmail: No match on "^Subject:.^POTENTIAL SPAM *"
procmail: No match on "^Subject:.POTENTIAL SPAM *"
procmail: No match on "^Subject:.*her horse*"

implies a not very efficient manner of testing for the subject.
You are running individual condition lines for each of those?
How about just

        * ^Subject:.*POTENTIAL SPAM

You do not need a star after the phrase.  In fact, yours makes
not much sense.  For example, "horse*" means "h-o-r-s- followed
by zero or more e's."

-- 
dman

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