Bogofilter and postfix (was: Bogofilter and Sendmail)

Bill Wohler wohler at newt.com
Thu Dec 4 22:27:22 CET 2003


Bill Farina <billf at venture-1.com> writes:
> I believe that I have bogo trained and ready, I just need to know how
> to invoke it.

Ditto for postfix.

I'm currently calling bogofilter with procmail. However, now that the
@#$!@!# spammers have somehow discovered all of the mailing lists on my
machine, I must now pass mail through bogofilter before it goes to the
mailing lists. Using my own bogofilter DB is appropriate since I'm on
all of the lists and therefore has been trained with the traffic on
those lists.

It just occurred to me that I could change an alias such as:

  list:        "|/var/lib/mailman/mail/wrapper post list"

to

  list:        "|/usr/local/sbin/bogowrapper post list"

Where bogowrapper looks something like:

    umask 077
    bogofilter -c /home/wohler/.bogofilter.cf \
               -d /home/wohler/.bogofilter -3 -e -p > /tmp/bogowrapper$$
    if `grep -q X-Bogosity: No /tmp/bogowrapper$$`; then
	/var/lib/mailman/mail/wrapper $@ < /tmp/bogowrapper$$
    else
	cat /tmp/bogowrapper$$ >> /usr/local/spool/spam
    fi
    rm /tmp/bogowrapper$$

That solution would be independent of the MTA. Is anyone's hackmeter
going off?

-- 
Bill Wohler <wohler at newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.




More information about the Bogofilter mailing list