TN wrote:
Hi all,

It seems that almost everyone wants spamassasin before SMTP, but I need help in 
setting it up after delivery.

At the moment, I am using Exim4.6x, with SA 3.1.7, and it's default setup is to 
do the filtering at the ACL stage in Exim. We find this a bit tedious since 
users sending email have to endure quite a delay when sending, while SA does 
its work.....we would much prefer it to accept the delivery, so that the user 
isn't waiting for their email client to finish up. We don't reject spam anyway, 
we're just happy to rewrite the subject, mark the email as spam and then let 
the email client rules sort the ham from spam based on those 2 marks - 
obviously we don't have a heavily laden email link so we can afford to accept 
spam and filter it after SMTP.

Alternatively, can it be configured to not do ANY filtering on authenticated 
senders, but process every other incoming email at ACL stage ? This would 
probably be best.

How can I do either of these with Exim & SA ?


thanks
T
TN,

This probably belongs on the Exim-users list, rather than the spamassassin list, but here goes...

It's pretty easy... In your rcpt acl, set a variable for your relay_from_hosts and authenticated users. Then, in the data acl, accept the message if the variable is set before you send the message to spamd. I also bypass spamd for messages from user-approved senders.

check_rcpt:

 accept
       hosts           = +relay_from_hosts
add_header = X-ANTISPAM: Message sent from an accepted end-user host or network
       set acl_m_allow = 1
       control         = submission

 accept
       authenticated   = *
add_header = X-ANTISPAM: Message sent from an authenticated user
       set acl_m_allow = 1
       control         = submission

 accept
       condition       = ${if eq{${lookup mysql{USER_ACL}}}{allow}{1}{0}}
       set acl_m_allow = 1
add_header = X-ANTISPAM-SKIPPED: Sender in user's allowed senders list

check_data:

 warn  condition       = ${if !={$acl_m_allow}{1}}
       spam            = global:true
add_header = X-SPAM-SCORE: $spam_score\nX-SPAM-REPORT: $spam_report


--
 Troy Settle
 Pulaski Networks
 866.477.5638



Reply via email to