Page 1 of 1

30 secs delay for every SMTP connection

Posted: Mon Jul 24, 2006 7:57 am
by jnarvaez
Hi,

I'm having some delay trouble with every SMTP connection. If I do a telnet to my server on port 25, the connection is established but i have to wait about 30 secs to recieve the 220 response. However if I do the same from the local machine (telnet localhost 25) i get an instant response.

If I stop spamassassin and reconfigure mailscanner, I get an instant response again.

I tried the famous -Rt0 and restart xinetd but no effect. My resolv.conf contains nameservers from my ISP and 127.0.0.1

This is my smtp_psa:
service smtp
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = -Rt0 /usr/sbin/rblsmtpd -r blackholes.mail-abuse.org /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}

any help would be apreciated

Posted: Mon Jul 24, 2006 9:50 am
by scott
Thats definitely the correct config.

Posted: Mon Jul 24, 2006 11:45 am
by jnarvaez
then?? what's wrong?? any idea?

Posted: Mon Jul 24, 2006 6:32 pm
by scott
no idea, maybe theres something upstream screwing up your connections.

Posted: Tue Jul 25, 2006 6:25 am
by jnarvaez
something really strange... i'm only having problems with SMTP, pop3 and other services work fine, and the problem is when spamassassin is running

Posted: Tue Jul 25, 2006 8:40 am
by jnarvaez
i raised the concurrency values but no effect, 30 secs to get the 220 response. But if I try from the same server I get an instant response.

Posted: Wed Jul 26, 2006 3:41 am
by jamesyeeoc
Are you running the SA from Scott's repos?

Do you have any other SA addons or other vendor's antispam products also on the server (4psa or others)?

What firewall (and related software) are you using, and have you tried temporarily disabling it and test connection speed?

Posted: Fri Jul 28, 2006 5:55 am
by jnarvaez
yes, i'm using scott SA and yes i tried to stop APF temporarily, i restarted xinetd and qmail without success. But today, i reboot my entire server and everything works fine now!

Thanks for your help!

Re: 30 secs delay for every SMTP connection

Posted: Sun Aug 06, 2006 10:23 pm
by Snapdragon
jnarvaez wrote:/usr/sbin/rblsmtpd -r blackholes.mail-abuse.org
You are bound to experience some delay when you use a DNSBL, while it checks the incoming IP against the list. To eliminate this part you can either whitelist your IP or remove the DNSBL temporarily. I use Spamhaus and it can take up to 20 seconds to get a connection... but is it ever worth it.