[Spambayes] Spambayes in an Exim filter?

Andrew Walkingshaw andrew at lexical.org.uk
Thu Aug 21 16:11:37 EDT 2003


Dear all - sorry to trouble you, but FAQs/documentation/Google have
failed me here.

I'm wanting to set up Spambayes as part of my Exim filter. At present
I use multiple local-parts (in terms of my email address) in order to
sort mail into many different mailboxes - essentially, per-list email
addresses: ideally, I'd score mail with Spambayes, and filter the spam
out *first* before allowing the remainder of the mail to go into my
current .forward filter:

# Exim filter

if ($original_local_part is andrew-spambayes)
	then
	save $home/mail/spambayes
elif ($original_local_part is ....
	then
        ....
elif 
....
elif
endif

However, there doesn't seem to be a clean way to do this; the best I can
see is to initially invoke an external script which calls spambayes,
then reinjects the mail into the mail queue - something like (pseudocode)

if spambayes_header_missing
    then
    call_spambayes_and_reinject
else
    then
    do_current_processing
endif

as Exim doesn't seem to allow an invoked program to return control to
the filter directly after it's finished; this "solution" is a bit
grubby and fragile, really. Does anyone have a neater method than
this? I'd rather not have to learn procmail...

Yours,
- Andrew



More information about the Spambayes mailing list