procmail
[Top] [All Lists]

Re: Another Newbie Question.

2003-03-13 15:38:21
Thank you for the reply.

I have no problem against filtering a message from the body, but what my
question was, is filtering messages against a word list that I can keep
in a file, instead of adding more and more rules in my /etc/procmailrc

That was the question in short I don't know what even my explanation on
what I was looking for didn't clear this.






On Thu, 13 Mar 2003 08:58:45 -0800, PSE-L(_at_)mail(_dot_)professional(_dot_)org
(Professional Software Engineering) wrote:

At 22:05 2003-03-12 -0800, Multimedia Fan wrote:
My etc/procmailrc is growing and is becoming hard to track.

Break it into component parts and use INCLUDERC to include them into the 
central file.  This is detailed in 'man procmailrc'

Is there a way that I organize the spam detection in the BODY of the
message to fgrep certain words that I was told to filter out?

'man procmail'

then, hit:

        /the body

and press enter (or, if you're adventurous, just search for 'body').

Let's assume that I have SPAMMERS file containing words that we need to
filter.

"SPAMMERS" as a filename rather implies that it is spammer identifications, 
not, say "SPAMTERMS"

How do I check against the message body and not the headers?
Looking at the above, is it possible to check against the subject line
too,  (-x Subject:)?

If you refer to the procmail list archvies and do a few searches, or check 
the sandbox referred to in my .sigline disclaimer, you'll find that some 
people extract certain headers right up front, then they have them in 
variables which they can check easily, like so:

* SUBJECT ?? some|list|of|words

You already know the formail invocation of checking against specific 
headers if that's the route you want to take.

BTW, pursuant to an exchange which you had with someone else here, if 
spending the time to learn procmail, or manage the scripts becomes too much 
of a bother, you might consider just using one of the managed spam 
filtering packages such as SpamAssassin.  That isn't my approach, but if 
you're intent on dealing with spam effectively, you'll find yourself 
spending a lot of _time_ keeping on top of your rules.

Further, simple keyword rulesets are going to give you a LOT of grief - if 
you had a body keyword filter running, your OWN post asking for assistance 
with writing the filter would have been rejected, as would any of the 
replies containing those keywords.  Several may appear in legitimate 
discussions as well.

If you really insist on managing it all yourself, you might take the _time_ 
to investigate 'man procmailsc' - scoring.  Where you judge a message as 
being 'spammish' based on a number of criteria, individually which may be 
insufficient to mark a message as spam, but measured together, identify the 
message as crap.

Another thing to consider: DO NOT SIMPLY /dev/null SUSPECTED MESSAGES.  You 
sure as hell shouldn't do that from a recipe running in /etc/procmailrc 
that you're _testing_.  Unless you're the sole user of your system, and you 
don't mind losing legitimate mail while you're not learning procmail.

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




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