On Thu, Apr 22, 2004 at 02:08:05PM +0100, Graham Trott wrote:
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
Do the spam mails actually have *exactly* the line:-
X-Bogosity: Yes, tests=bogofilter
in them? It's a standard RE match so unless the commas, spaces, etc. are exactly as specified you won't get a match. I think I'd reduce it to something like:-
* ^X-Bogosity: Yes