Making your Spam mail box easier to check for Ham...

Jonathan Hunt jonathan at xlcus.com
Fri Jun 27 22:02:22 CEST 2003


> # Call bogofilter
> :0fw
> | bogofilter -u -e -p -o 0.49999 | sed
> '/^X-Bogosity:.*spamicity=[0-9.]*/G;s/\(^X-Bogosity:.*spamicity=\([0-9.]*\).
> *\)\(\n\)/X-Label: \2\3\1/'

Thought I'd point out that the above should all be on one line.
I've attached my .procmailrc file just to make it clear...

--
Jonathan Hunt
http://sytes.org/
-------------- next part --------------
SHELL=/usr/local/bin/bash
PATH="$HOME/bin:/usr/bin:/usr/local/bin:/usr/include:/usr/local/sbin:/bin:/sbin:/usr/sbin"
MAILDIR=$HOME/Mail
PMDIR=$HOME/.procmail
LOGFILE=$PMDIR/log
LOGABSTRACT=all
VERBOSE=no

# Inserts a blank line between each message's log entry
LOG="
"

# Call bogofilter
:0fw
| bogofilter -u -e -p -o 0.49999 | sed '/^X-Bogosity:.*spamicity=[0-9.]*/G;s/\(^X-Bogosity:.*spamicity=\([0-9.]*\).*\)\(\n\)/X-Label: \2\3\1/'

# If bogofilter failed, return the mail to the queue, the MTA will retry to
# deliver it later. 75 is the value for EX_TEMPFAIL in /usr/include/sysexits.h
:0e
{ EXITCODE=75 HOST }

# File the mail to the spam folder if it's spam.
:0:
* ^X-Bogosity: Yes, tests=bogofilter
spam

# Copy unfiltered mail to the backup folder.
:0c:
backup



More information about the Bogofilter mailing list