OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
PATCH (lost connection with domain while...)

From: Wietse Venema (wietseporcupine.org)
Date: Tue May 01 2007 - 08:04:36 CDT


Wietse Venema:
> Are you perhaps behind a NAT gateway? This may expire the connection
> from its tables too early. Such boxes tend to be optimized for
> short-lived http connections which is bad for email.
>
> Is the remote SMTP server behind a NAT gateway?
>
> In either case, it may help to turn on keep-alives.,
> For example, in FreeBSD:
>
> sysctl -w net.inet.tcp.keepidle=100000

Linux specifies the interval in seconds:

    sysctl -w net.ipv4.tcp_keepalive_time=100

Solaris specifies it in milliseconds, like *BSD:

    ndd -set /dev/tcp tcp_keepalive_interval 100000

Linux sends keepalive probes only after an application turns on
the SO_KEEPALIVE option on a socket.

I suppose Solaris has the same behavior.

To turn on the SO_KEEPALIVE in Postfix, see attached patches for
Postfix 2.3, and for 2.4 and later. It takes an existing workaround
for Solaris, and turns it on for all platforms.

        Wietse