Re: [Exim] Exim, SpamAssassin, and interpreting results

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Jonathan Vanasco
Data:  
Para: exim-users
CC: sa-exim
Asunto: Re: [Exim] Exim, SpamAssassin, and interpreting results
cross-posting this, because others might find this useful...

Figured this out using an expansion in a delivery transport -- works
like a CHARM

Right now, SA-Exim is set to reject all mail ranked 20+ by a global
spamassassin conf at smtp time

Mail ranked 12+ is defined as spam, but still accepted

All mail is delivered to the user -- 0-11 to the inbox, 12+ to the
spam-probable subfolder

each of my users will be getting a spam-probable, spam-definate and
spam-blocked_notspam folder -- perl scripts will troll the the latter 2
folders nightly to add data to site-wide filtering

I can't believe how ridiculously simple this was. thanks to all who
helped me along.

virtuals_maildir_delivery:
   driver                        = appendfile
   directory =
/var/mail/$domain/${substr_0_1:$local_part}/$local_part/${if eq
{${substr_0_3:$header_X-Spam-Status:}}{Yes}{.spam-probable}{}}
   create_directory
   directory_mode = 0775
   delivery_date_add
   envelope_to_add
   return_path_add
   maildir_format
   group = mail
   mode = 0660


------
I've got SA-Exim built in to check spam at smtp time

Right off the bat, any mail spam-assassin flags as 20 or higher I want
to reject (which should block a bunch out if razor gets involved).

With the remaining mail, I'd like to deliver it to one of 2 places:
    $maildir -- mail ranked 12 or less
    $maildir/.spam-probable - mail ranked 12+


The idea being, a cron job would go through user directories daily
learning from
    $maildir/.spam-definate
    $maildir/.spam-notspam


A friend has this running pretty well with procmail and qmail. I think
I could get this done in exim alone

Just having a little bit of trouble with the logic.

Right now, i'm thinking that I use two separate routers -- the first
one substrings the SA header for the ranking, and fails the router if
its higher than 12 - else it hits a transport to the inbox. the second
router passes mail to a transport in the sub-folder of the inbox.

Does that seem right? or is there some way i could do an if-else with
a header regex in a single transport?