I'm trying to filter out the tidal wave of spam, now reaching 100 a day on one mailbox, by using bogofilter as part of a procmail filter. My mailserver is postfix, set to invoke procmail by having main.cf contain the line
mailbox_command /usr/bin/procmail
I set up /etc/procmailrc to contain the following:
-------------------------------------------------------------------- # Pass all mail through bogofilter
:0fw | bogofilter -u -e -p
# If bogofilter failed, return the mail to the queue. # The MTA will retry to deliver it later.
:0e { EXITCODE=75 HOST }
# File the mail to "spam-bogofilter" if it's spam.
:0: * ^X-Bogosity: Yes, tests=bogofilter spam-bogofilter --------------------------------------------------------------------
which according to the bogofilter manual should send all spam to "spam-bogofilter". But it doesn't. The messages get delivered to the user's mailbox without spam-bogofilter ever getting written. The messages themselves contain the X-Bogosity headers and are correctly classified as being spam or not, so it appears either the last rule isn't being reached or isn't operating correctly. I find the procmail syntax pretty impenetrable; can anyone help deduce what's going wrong?
-- GT