procmail
[Top] [All Lists]

Re: Rejecting multiple names/subjects at once?

1996-07-12 10:50:53
On Mon, 10 Jun 1996 08:11:56 -0700, "Alan Stebbens 
<stebbens(_at_)anywhere(_dot_)engr(_dot_)sgi(_dot_)com>" 
<stebbens(_at_)anywhere(_dot_)engr(_dot_)sgi(_dot_)com> said:

   # This recipe filters FROM through the badaddrs file, if egrep succeeds,
   # then we don't want this mail, and we'll bounce it
   :0E
   * ? echo "$FROM" | egrep -f $BADADDRS
   { BOUNCE=1 }

An additional condition that I like to put in the above recipe is:

   * $ ? test -s $BADADDRS

This verifies that the BADADDRS file exists and is not empty.
Otherwise an empty BADADDRS file will match all mail, and
bounce everything.  

This also changes the recipe's behavior when the BADADDRS file doesn't
exist.  With my mod no error is written to the logfile, encouraging
disabling the feature by deleting or renaming the BADADDRS file.

Mike

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