procmail
[Top] [All Lists]

Re: regarding a possible filter

2006-07-25 11:06:02
At 09:14 2006-07-25 -0500, TLD Procmail wrote:

  To: efhutton(_at_)realty(_dot_)com

   Or they put a ficticious name:

   To: "Kerk Johnson" <efhutton(_at_)realty(_dot_)com>

   I'm considering writing a filter to check for this.  It
will basically look for the absence of a real name and give
the email a negative score for it.  Or, if the name exists
but its not the name of someone in my office, then give it
a negative score.

er, and you're going to know the collqial names of everyone in your office?

"pookie" "snookums", "Dick" instead of "Richard", "Rob" vs. "Robert", etc?

Too many people don't provide a name along with email.  It's rather arbitrary.

  It will also need to check to see if the email is directed
at a person via CC and not To, which presents other problems.

you could just score for how many addresses at your domain a message is 
cleartexted to, and how many of those are invalid.

  Does it make sense to do this in a filter?

I'm not sure the whole concept is particularly feasable.  Have you saved a 
corpus of spam which you feel would meet the criteria?  I _archive_ all the 
spam that reached the LDA (plenty is warded away during the SMTP 
phase).  These I feed back into my spam filters at later revisions.

  My believe is that the filter shouldn't do anything more
than add a header item to the email to indicate that it
found a negative something or other.  Then, procmail will
deal with the email based on this header item.

If you set _variables_ within procmail during message handling, there's no 
need to add a header - if procmail is the tool you're expecting to take 
action on the message (versus passing it along to the user to let their own 
MUA filters deal with it).

  And the last question, if I do write as a filter, what
exit codes should be sent (from the filter), if any, to
indicate success or failure?

0 = success
!0 = failure.

there are flags to say to ignore the exit code though.  You also want to 
pay attention to whether you're passing in only the header, and if your 
filter doesn't read in the whole header -- if it terminates after it's 
found what it is looking for without reading in everything on its STDIN, 
then procmail may flag an error unless told to ignore that condition.

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