procmail
[Top] [All Lists]

Re: Help with Harassment

1996-07-12 03:16:33
Would someone please help me. Right now I have someone forging headers so
they make it through my procmail. They are sending threats and harassment
and I don't want to see it. 

It people are forging email at you you should definitely take it up with
the system adminitrators of the site in question, or with their upstream
site if they are their own admins.  Harrassment is serious, and so is
forgery.

1. Is there anyway to get the Procmail to recognize something besides the
Subject, To and From lines? Can it search the Received-From lines? If so,
how can you do that?

Sure.  Where a recipe might say:
* ^Subject:.*sometext
change it to
* ^Received-From:.*someaddress

2. Is there any way to get Procmail to recognize a CC line? 

The "^TO" and "^TO_" tokens do recognise a Cc: header, so this matches:
* ^TOsomeaddress
but if you want to specifically check the Cc: header, do it this way:
* ^Cc:.*someaddress

3. Is there any way to get Procmail to search the entire body of the message
or the header for a certain key word. 

If you want to search the header, it will do it by default:
* somekeyword
If you want to search the body, probably the simplest way is to include
the "B" flag on the flag line (the one starting ":0"):
:0 B
* somekeyword

Of course, all recipes should have the :0 line, so if you wanted to
filter these into your junk folder you'd do:

:0 :
* oneoftheaboveconditions
junk

I recommend putting the mail into a junk folder rather than discarding
it in case it matches other mail too.
 
If you wanted to be more clever you could do such things as scoring.
All the above is described (though not explained in simple terms) in the
procmailrc and procmailsc manual pages.  If this is still not making
sense, read the procmailex page to see some examples.

-- 
Tim Pickett                                     
tlm(_at_)yoyo(_dot_)cc(_dot_)monash(_dot_)edu(_dot_)au
"You gotta bat your eyes - like this."         
tbp(_at_)molly(_dot_)cs(_dot_)monash(_dot_)edu(_dot_)au

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