Re: SA-Exim timeout

Marc MERLIN <[email protected]>
Newsgroups gmane.mail.exim.spamassassin
Message-ID <[email protected]>
On Sun, Oct 20, 2002 at 11:32:18PM +0100, Tim Jackson wrote:
> Marc, 

[Answering on the list, because this may affect more than just you]

> Just a quickie before I go to bed - any quick ideas about how exim might
> time SA-Exim out, when I've got it set to explicitly time spamd out after
> 4 minutes? I've just had another quick look through the code and I can't
> figure out where it might have stalled.

Right. I've noticed that  too, and honestly, I'm not too  sure, it's not
supposed to happen. I'm pretty sure I had tested that when I wrote the
timeout feature.
When do you get the timemout? Are you trying to stall the sender or is
spamd just taking too long to answer?

If the C coders can look at:
http://marc.merlins.org/linux/exim/files/sa-exim-cvs/sa-exim.c

In both teergrube and and stallsender, I do
	    /* Exim might want to stop us if we run for too long, but that's
	     * exactly what we're trying to do, so let's override that */
	    alarm(0);

Otherwise, all the code also gets
	    signal(SIGALRM, alarm_handler);
	    alarm (SAtimeout);

If the SA alarm quicks in, you should get this in your log:
log_write(0, LOG_MAIN | LOG_REJECT, "SA: spamd took more than %d secs to run, accepting message", SAtimeout);

I know this code works at least sometimes because I am getting this message
in my exim logs from time to time.

So the question is when does it not work?
Is it since you switched to exim 4.10 or a more recent sa-exim?

How about other people? Are you seeing this too?
Are you just doing rejection/tagging or also talling the sender on high spam
scores?

> I've just noticed today (since I upgraded to 2.1, and did various other
> hacks including adding exiscan) that one odd message this evening got
> timed out *by exim* (not internally within SA-Exim) when it was in
> SA-Exim:
> 2002-10-20 22:02:46 183N8i-00086l-00 local_scan() function timed out -
> message temporarily rejected

Right. I'm seeing this  on my teergrube code, although not  when I tried
to reproduce it by sending a spam myself over telnet. Mmhh...

> Haven't tried the teergrubeing yet :)

Well, it works, except for the fact that I use printf to output the SMTP
response, and that  if I'm inside an SSL connection,  I output cleartext
and break the SSL connection :-)

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking 
Home page: http://marc.merlins.org/   |   Finger [email protected] for PGP key
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.