[Greylist-users] Socket timeouts
Scott Nelson
scott at spamwolf.com
Sat Aug 9 01:56:28 PDT 2003
At 09:51 PM 8/8/03 -0700, you wrote:
>Content-type: text/plain; charset=US-ASCII
>Content-transfer-encoding: 7BIT
>Content-description: Mail message body
>
>I wrote an SMTP that incorperates grey listing. The problem I am having
>is with socket timeouts, currently set at 2 minutes. Some "real" servers
>are having problems sending because of the 2 minute timeout. Does anyone
>have an idea what the socket timeout should be.
>
>I pulled 2 minutes out of the hat thinking that it would be generous
>enough.
>
IIRC, on linux, the default /proc/sys/net/ipv4/tcp_syn_retries is 5,
and each takes about 30 seconds to time out,
which is about 2 minutes and 30 seconds.
This simple command;
> time telnet 1.2.3.4
will give you a very good idea what the socket connect
timeout is on your system.
But if you're asking how long you should wait before closing
an inbound connection, RFC 2821 has some specific recommendations,
most of which are 5 minutes.
See RFC 2821 section 4.5.3.2 Timeouts, for details.
If you're the one connecting, keep in mind that many servers
do an rDNS lookup these days, which can add as much as 3 minutes
to any other connection delays. (If you're doing one,
consider not doing it and just using the IP address.)
Scott Nelson <scott at spamwolf.com>
More information about the Greylist-users
mailing list