mirror of
https://github.com/mailscope/kumomta.git
synced 2026-09-12 05:22:13 +00:00
Some upstream peers (e.g. QQ Mail's rate-limiter) silently hold a proxied TCP connection open indefinitely — sending no data, FIN, or RST — rather than cleanly refusing. Without some kind of timeout management, the two file descriptors for such a session remain open for the lifetime of the process, slowly exhausting the kernel's file-descriptor table and occupying proxy-server worker slots. This commit configures kernel level keepalive options with reasonable defaults to detect and close out this class of connection. Co-authored-by: Wez Furlong <wez@wezfurlong.org> Closes: https://github.com/KumoCorp/kumomta/pull/509