trouble using unbase64 w bogofilter & procmail

Barry Gould BarryGould at PennySaverUSA.net
Sat Nov 16 00:22:55 CET 2002


At 07:16 PM 11/8/2002, Allyn wrote:
>Barry Gould wrote:
>>Would it instead be possible to look for "Content-Transfer-Encoding: base64"
>
>that is an excellent idea.
>how about this updated second-try rule:
>
>:0fHB
>* < 256000
>* H ?? ^X-Bogosity: No
>* ^content-transfer-encoding: *(base64|quoted-printable)
>* ? unbase64 | bogofilter
>| formail -I"X-Bogosity: Yes, tests=bogofilter-unbase64"

Allyn, thanks for that recipe.

Unfortunately, I'm having some trouble with it.

It seems to work if the users mailbox is small, but for one user whose 
mailbox is about 1.4MB, it never seems to execute this rule, or it gets 
clobbered due to locking issues.
(The larger mbox gets the spam with the standard bogofilter header, not the 
bogofilter-unbase64 one)

I haven't been able to figure it out;
Can you advise?
(I don't think I understand procmail well enough)

My entire recipe is below.

I'm now using bogofilter 0.80 on linux with procmail 3.22.
Filesystems are all ext3.

I'm not using any bogofilter.cf, and I have a SYMLINK for
/root/.bogofilter -> /var/spool/mail/.bogofilter
as I'm keeping the db's in /var/spool/mail/.bogofilter

Bogofilter has otherwise been working perfectly.

Thank you,
Barry


/etc/procmailrc:
---------------------
MAILDIR=/var/spool/mail
HOME=/var/spool/mail
BACK=/var/spool/mail/.backups

#backup everything first
:0c:
$BACK/backup

# filter mail through bogofilter, tagging it as spam
:0fw
| bogofilter -e -p

# if bogofilter failed, return the mail to the queue, the MTA will
# retry to deliver it later
:0e
{ EXITCODE=75 HOST }

#check for base64 spam
:0fHB
* < 256000
#* H ?? ^X-Bogosity: No
* ^content-transfer-encoding: *(base64|quoted-printable)
* ? /usr/local/bin/unbase64.pl | bogofilter -u
| formail -I"X-Bogosity: Yes, tests=bogofilter-unbase64"

#update db ONLY IF it was spam (due to too many false negatives)
:0c
* ^X-Bogosity: Yes, tests=bogofilter
| bogofilter -s

--------------





More information about the Bogofilter mailing list