Might have found the problem (was Re: [Exim] Exim hangs duri…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Ralf G. R. Bergs
Dátum:  
Címzett: exim-users@exim.org
CC: John Horne
Régi témák: Re: [Exim] Exim hangs during BSMTP input
Tárgy: Might have found the problem (was Re: [Exim] Exim hangs during BSMTP input
On Mon, 03 Feb 2003 14:07:17 +0000 (GMT), Philip Hazel wrote:

[...]
>I ran the command
>
>$ exim -os 1s -bS
>
>After 1 second, the output was:
>
>421 SMTP command timeout
>Transaction started in line 0
>Error detected in line 0
>An error was detected while processing a file of BSMTP input.
>The error message was:
>
> 421 SMTP command timeout
>
>The SMTP transaction started in line 0.
>The error was detected in line 0.
>0 previous messages were successfully processed.
>The rest of the batch was abandoned.


Ok, I might by chance have found the problem, thanks to a message from John
Home -- which I stupidly misplaced in the incorrect folder and just stumbled
across again.

On Thu, 21 Nov 2002 13:00:38 +0000 (GMT), John Horne wrote:

>On 19-Nov-2002 at 12:41:03 Ralf G. R. Bergs wrote:
>> I'm still seeing Exim processes that run for half an hour or even longer.
>[snipped]
>> The only thing I can think of what could be going wrong is that the calls
>> to SpamAssassin during SMTP time take that long. I've already removed the
>> Razor calls from SpamAssassin because I suspected them and I don't see
>> great benefit from Razor (V1), but this didn't help. My DNS system is
>> "sane," i.e. DNS calls don't take more than a fraction of a second.
>>
>Yes, I used to see this. Haven't for some time now.
>
>> Is there any option (I don't think so) that would allow me to set a
>> maximum lifetime for Exim son processes? And if processes haven't died
>> after that time Exim would automatically kill them? Do you think that
>> such an option would be useful in case it's not already there?
>>
>Are you using the 'sa-exim' that is available? I wrote our own smaller
>version, but left out the bit that setup a timer (this, hopefully, catches
>any runaway processes). We then had the problem you describe. So I put some
>timer code in, SA runs for about 4.5 mins and then gets aborted, and since
>then we've had no runaway processes. Could just be luck of course! :-)
>
>One thought. sa-exim sets up the timer to kick the spamc/spamd process. If
>you are using options to specify who spamc/spamd runs as then maybe sa-exim
>doesn't have premission to abort the process.


And the last paragraph probably contains the solution.

I guess the problem isn't within my local Exim not terminating the SMTP
session after the timeout, but the problem might be that sa-exim can't
terminate the SpamAssassin client spawned by local_scan() during SMTP time
since it is indeed running under a different user id as the one Exim is
running under.

I have now changed my setup so that both SpamAssassin and Exim run under the
same uid. I will get back to you whether this solves my problem.

Thanks anyone for their suggestions!!


--
   L I N U X       .~.
  The  Choice      /V\
   of a  GNU      /( )\
  Generation      ^^-^^