Timothy J Luoma and era eriksson have further improved the
anti-spam filter and both Andrew Beckett & Shashishekhar Kurki-Gowdara
have further isolated the apparent Solaris 2.x fgrep -i bug.
The reputed bug indeed is quite easily reproducible.
We're still trying to better understand this reputed Solaris
fgrep -i bug before giving up on Solaris and switching
to a different fgrep. We'd rather not. Maybe there's a solution here...
---------------------------------------------------------------------------
Here is where the reputed Solaris fgrep -i bug stands as of now:
# This fgrep below fails on Solaris 2.5.1
# (But works fine on SunOS 4.x, HP 10.2.)
:0hb
* ? formail -ISubject: | fgrep -i -s -f $PMDIR/banned
{
EXITCODE=77
:0:
automated/junk
}
# Where the file of known spammers, $PMDIR/banned, is of the format:
Broker(_at_)lostvegas(_dot_)com
Dwnliner(_at_)ix(_dot_)netcom(_dot_)com
Emerald(_at_)earthstar(_dot_)com
bill(_at_)earthlink(_dot_)net
etc.
---------------------------------------------------------------------------
To reproduce the fgrep -i failure on Solaris, simply try this test:
cat > stuff <<EOF
Broker
Dwnliner
bill
Emerald
EOF
fgrep -i -s -f stuff <<EOF
bill
EOF
echo $status
This outputs 1; rather than 0.
(Removing the "-i" outputs the 0 like it is supposed to.)
---------------------------------------------------------------------------
Also, from Shashishekhar Kurki-Gowdara, it seems that
"This Solaris fgrep -i problem seems to happen only with the
words 'Broker' and 'bill'; when the word 'bill' comes any
time after the word 'Broker'. If you remove 'Broker', or if
you put 'bill' ahead of 'Broker', the Solaris 'fgrep -i'
works fine. If you change 'Broker' to 'broker', the Solaris
'fgrep -i' works fine. None of the other words seem to matter
in the test case above.
Anyway, one workaround is to make sure that the file
"stuff" contains only lower-case letters (maybe you can
tell procmail to use a tr command to transform upper to
lower-case letters), since the -i will take care of the
case of the characters in the incoming text."
So, that's where the Solaris fgrep -i bug stands at the
moment.
Note: Andrew actually creates the "banned" list automatically
by pressing a customized [BAN] button in Zmail 4.0.1,
so I guess we could add a "tr" command to that Zmail
interface, but, it's not elegant. Maybe procmail can
do that better?