develooper Front page | perl.qpsmtpd | Postings from January 2007

smtp connections never timeout

Thread Next
From:
Oscar Retana
Date:
January 23, 2007 09:32
Subject:
smtp connections never timeout
Message ID:
30B0C5DB-1F69-4CB1-9CCB-56BA5346440D@gridshield.net

I've been receiving several alerts from my mail filtering server,  
because it's reaching the max limit of SMTP connections... Not a new  
thing, a lot of plug-ins can increase their processing time depending  
on external factors.

BUT yesterday I couldn't find any culprit plug-in. In fact, I  
disabled ALL plug-ins. Basically my qpsmtpd/config/plugins file was  
left to this (for testing):

rcpt_ok
queue/qmail-queue

Nothing... Then I increased the max limit from 80 to 160, and then to  
200, but the limit has been constantly reached since yesterday  
3:00pm. This server has handled about 20 smtp connections for months.

So, I noticed that one (then several) of the "qpsmtpd-forkserver"  
processes had been running for almost half an hour. I know the  
default timeout value is 1200 seconds (20 min), so I changed  
"timeoutsmtpd" and "timeout" to 300 seconds (5min).

... It doesn't work. I haven't seen in the logs any message about  
dropping a connection due to a timeout. Processes are still alive  
after 30 o 45 min.

Then a found these lines commented out in qpsmtpd/lib/Qpsmtpd/SMTP.pm:

# this is only good for forkserver
# can't set these here, cause forkserver resets them
#$SIG{ALRM} = sub { respond(421, "Game over pal, game over. You got a  
timeout; I just can't wait that long..."); exit };
#$SIG{ALRM} = sub { warn "Connection Timed Out\n"; exit; };

Except from these commented lines, I can't find any other thing  
handling the "alarms".

Maybe, can someone explain me how is sopposed to work the timeout??


Qpsmtpd: 0.31.1
Running under daemontools: qpsmtpd-forkserver


Thanks for any comment!!!



--
Oscar Retana
Tel: (506) 258-5757
San José, Costa Rica
Gridshield: Protección y Monitoreo de Redes



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About