base64 spam / forcing bogofilter -p judgement

Matthias Andree matthias.andree at gmx.de
Thu Nov 7 00:58:06 CET 2002


On Wed, 06 Nov 2002, Tom Allison wrote:

> Like:
> 
> :0
> * ? bogofilter
> | formail -A "X-Bogosity: Yes"

Well, the simple things go without formail, but you asked about
unbase64.

I'd rather thought of something similar to this, which will add the
appropriate header, or push the mail back to the queue if bogofilter
fails:

-----------------
# feed though unbase64, then bogofilter, and capture the exit code in
# BOGOFILTER. Adjust the path to unbase64 as appropriate.
:0
BOGOFILTER=|/home/emma/bogofilter/contrib/unbase64|bogofilter;echo $?

# if it found spam, tag
:0f
* BOGOFILTER ?? ^0$
| formail -A 'X-Bogosity: Yes'

# if it did not find spam, check if it found non-spam, if so, tag
:0Ef
* BOGOFILTER ?? ^1$
| formail -A 'X-Bogosity: No'

# if it was not "0" or "1" that resulted from the pipe,
# push the mail back to the queue
:0E
{
  EXITCODE=75
  HOST
}

# delivery and other filter rules go here. This one just prints the mail
# on stdout. You'll probably want to remove this rule:
:0
|
-----------------




More information about the Bogofilter mailing list