SUMMARY:
FYI -- There may be a Solaris bug where the condition:
* ?grep -v '^Subject' | fgrep -i -s -f $PMDIR/banned
Needs to be changed to remove the "-i", for example, to something like:
* ?grep -v '^Subject' | fgrep -s -f $PMDIR/banned
DETAILS:
Andrew Beckett (andrewb(_at_)cadence(_dot_)com), in the UK, kindly wrote an
efficient
procmail filter banning repeat spammers using the simple recipe:
:0hb
* ?grep -v '^Subject' | fgrep -s -f $PMDIR/banned
{
EXITCODE=77
:0:
automated/junk
}
Where "banned" is simply a text file containing a list of known spammers, e.g.,
FreeWay(_at_)dm1(_dot_)com
KORBS(_at_)ix(_dot_)netcom(_dot_)com
hnet(_at_)dialup(_dot_)francenet(_dot_)fr
etc.
One issue for procmail users on Solaris was Andrew's finding that, in his
words:
> The reason for using grep -v first is because when using a command
> as the check with the ? operator, the whole header gets passed (not
> the body), and so I wanted to filter out the Subject lines, so that
> emails sent with the subject "Have you received a message from
> lah-blah(_at_)spam" don't get filtered.
>
> Note that I did have fgrep -i -s -f originally, but I discovered that
> whilst this works on SunOS 4.x, it fails on Solaris (even though -i
> for case insensitivity is in the man page).
>
> I think this is probably a Solaris bug.
I figured, if this is indeed a Solaris bug, the procmail users would
want to know about it. Any suggestions, let us know.