[SA-exim] Re: SA-Exim timeout

Tim Jackson lists at timj.co.uk
Mon, 21 Oct 2002 10:43:33 +0100


Hi Marc, on Sun, 20 Oct 2002 16:03:17 -0700 you wrote:

> So the question is when does it not work?

Wahey. I just managed to turn on debugging (damn: only level 5, which
misses a few bits) and be watching my logs as the problem mail got
retried. It's very strange - it seems like SA-Exim is not setting the
timeout for some reason.

Here's a previous message which worked OK:

SA: Debug enabled, reading config from file /my/config/file
SA: config read SAspamcpath = /my/spamc
SA: config read SAEximRunCond = ${fairly_normal_condition}
SA: config read SAEximRejCond = ${simple_condition}
SA: config read SAmaxarchivebody = 20971520
SA: config read SAerrmaxarchivebody = 1073741824
SA: config read SAtimeout = 200
SA: config read SAtimeoutsave = /my/SAtimeoutsave
SA: config read SAtimeoutSavCond = 1
SA: config read SAerrorsave = /my/SAerrorsave
SA: config read SAerrorSavCond = 1
SA: config read SAtemprejectonerror = 0
SA: config read SAteergrubtime = 900
SA: config read SAteergrubSavCond = 1
SA: config read SAteergrubsave = /my/SAteergrub
SA: config read SAteergruboverwrite = 1
SA: config read SAstallsendertime = 900
SA: config read SAstallsenderSavCond = 1
SA: config read SAstallsendersave = /my/SAstallsender
SA: config read SAstallsenderoverwrite = 1
SA: config read SAdevnullSavCond = 1
SA: config read SAdevnullsave = /my/SAdevnull
SA: config read SApermreject = 14.000000
SA: config read SApermrejectSavCond = 1
SA: config read SApermrejectsave = /my/SApermreject
SA: config read SAtemprejectSavCond = 1
SA: config read SAtemprejectsave = /my/SAtempreject
SA: config read SAtemprejectoverwrite = 1
SA: config read SAspamacceptsave = /my/SAspamaccept
SA: config read SAspamacceptSavCond = 0
SA: config read SAnotspamsave = /mySAnotspam
SA: config read SAnotspamSavCond = 0
SA: SAEximRunCond expand returned: '1'
SA: check succeeded, running spamc
SA: Setting timeout of 200 secs before reading from spamc
SA: Read from X-Spam-Status: hits=-81.8 required=6.0
SA: savemail condition expand returned: '0'
SA: savemail condition expanded to false, not saving message to disk
SA: score hits=-81.8 required=6.0 (scanned in 1/1 secs)
<normal delivery>

Now, here's the delivery that failed. Everything was identical until:

10:18:48 ...
10:18:48 183Yho-0004Ju-00 SA: check succeeded, running spamc
10:23:48 183Yho-0004Ju-00 local_scan() function timed out - message
         temporarily rejected

Notice the lack of a "Setting timeout..." message here. Weird, eh?
SAtimeout was definitely read from the config file in both cases (well,
according to the debug stuff)

During the 5 minutes, there was a spamc process sitting around supposedly
processing the message, but it didn't seem to be doing much (it wasn't
using any CPU time to speak of). The message did have a large attachment,
though.

I think there are thus two separate problems here:

1. something that is causing SA-E not to set alarm() 

2. something that is causing SA to not scan this particular message    
properly (maybe because of its size? I wonder if it may be something    
like the fact that SA-E has cut the message off half way through an 
attachment or something? Is spamc's cutoff handling more intelligent or
does it simply cut off after 'x' bytes?)

Obviously, 2) is causing 1) to show up. I'm more worried about 1), because
if that's sorted, then a problem message like this would have just got
accepted (with my settings, anyway).

Luckily I caught a copy of the offending message body while it was in the
spool directory, so now I'm going to play around some more.


Tim