Re: [exim] restarting spamd makes spam slip through?

Pàgina inicial
Delete this message
Reply to this message
Autor: Cédric MARCOUX (sprimont)
Data:  
A: exim-users
Assumpte: Re: [exim] restarting spamd makes spam slip through?
use the defer_ok clause to set exim to don't care about health of
spamassassin and clamd

Exemple:

-------------------------------------------------------------------------------------------
#Don't scan mail greater that 1MG
accept condition = ${if >{$message_size}{1M}}

   # Deny if the message contains a virus. Before enabling this check, you
   # must install a virus scanner and set the av_scanner option above.
   #
   deny message  = This message contains a virus ($malware_name).
   demime        = *
   malware       = */defer_ok




   # On ajoute les commentaires de SpamAssassin meme si ce n'est pas un Spam
   warn    message   = X-Spam-Score: $spam_score ($spam_bar)
           spam      = nobody:true/defer_ok
   warn    message   = X-Spam-Report: $spam_report
           spam      = nobody:true/defer_ok



# Add headers to a message if it is judged to be spam. Before
enabling this,
# you must install SpamAssassin. You may also need to set the
spamd_address
# option above.
#

   warn    spam      = nobody/defer_ok
           message   = Subject: !*SPAM*! $h_Subject:\n\
                       X-Spam_score: $spam_score\n\
                       X-Spam_score_int: $spam_score_int\n\
                       X-Spam_bar: $spam_bar\n\
                       X-Spam_report: $spam_report



   deny    message   =  This message scored $spam_score spam points.
   spam              =  nobody:true/defer_ok
   condition         =  ${if>{$spam_score_int}{30}{1}{0}}


   #deny  message     = This message matches a blacklisted regular 
expression
   #        regex     = [Vv] *[Ii] *[Aa] *[Gg] *[Rr] ][Aa]


   warn message       = X-ACL-Warn: Message with bad term (= 
$regex_match_string).
                regex = \n(?i)\bviagra\b\N : \N(?i)\bcialis\b\N : 
\N(?i)\btadalafil\b\N
             logwrite = :main: MSG_D04_REGEX1 (= $regex_match_string).


# Accept the message.

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


John Horne a écrit :
> On Tue, 2006-08-08 at 18:21 +0200, Andreas Pettersson wrote:
>> Hi all.
>>
>> I run Exim 4.63 and SpamAssassin (from acl) on FreeBSD.
>> Sometimes when I need to restart spamd I find that a few spam mails slip
>> through, even though spamd is unavailable for less than a second. To
>> prevent this from happening I tried to stop exim first, wait a few
>> seconds, and then restart spamd, but the problem still occurs sometimes.
>>
>> I get three of these in paniclog:
>> spam acl condition: warning - spamd connection to 127.0.0.1, port 783
>> failed: Connection refused
>> spam acl condition: all spamd servers failed
>>
>> How can I make sure exim has nothing 'going on' while I restart spamd?
>>
> Hello,
>
> We have the same problem. Our mailhubs use Fedora Core 4, and running
> 'service exim stop' doesn't shutdown all the exim processes immediately.
> In fact it can take several minutes, and usually running the command a
> second time finally removes all the exim processes. Then we restart
> spamassassin.
>
> If you are using SA rules-de-jour, you will still have the problem when
> SA is restarted after updates. As far as I remember SA is restarted, but
> the MTA is not stopped/restarted, hence you'll still get those messages
> in the panic log.
>
> The suggestion of a check in the ACL is interesting. May well
> investigate that one :-) I guess a check before calling SA is needed to
> avoid the panic log entries.
>
>
>
>
> John.
>