On 20.10.2012, at 19.39, Sven Hartge wrote: > I am about to migrate a perdition-based IMAP/POP3 proxy to Dovecot. > > Unfortunately some users are behind a firewall/NAT setup which throws > away seemingly idle TCP connections sooner than the established default > of 24 hours (more likely after 30 minutes ...) resulting in all kinds of > weird client behavior. > > And unfortunately² this firewall/NAT setup is outside of my control and > I have no means of correcting this (in my opinion) flawed configuration. > > Now, with perdition I was able to use the --tcp_keepalive option which > totally solved the mentioned weird client behavior. > > My question is: does Dovecot2 use TCP-Keepalive on its sockets per > default or do I need to enable it some way I have not yet discovered?
It's the default yes. Of course Linux's default keepalive interval is something like 90 minutes, so have you changed that already?.. > The manual and wiki only talk about "keepalive" in connection with the > IMAP protocol and IDLE and my C-fu is too weak to understand the source > code. imap_idle_notify_interval (default 2 min) causes Dovecot to send data to IDLEing connections, which pretty much makes the TCP keepalive irrelevant. For non-IDLE connections Dovecot has a disconnect timeout of 30 minutes.