* fetchmail now supports an environment variable to suppress marking deleted
messages as seen at the same time, FETCHMAIL_IMAP_DELETED_REMAINS_UNSEEN.
See the manual page for details. Requested by Jonathan Buschmann.
+* fetchmail sets Internet domain sockets to "keepalive" mode now. Note that
+ there is no portable way to configure actual timeouts for this mode, and some
+ systems only support a system-wide timeout setting.
# BUG FIXES
* Call strlen() only once when removing CRLF from a line. (Sunil Shetye)
return err;
}
+/** Set socket to SO_KEEPALIVE. \return 0 for success. */
+int SockKeepalive(int sock) {
+ int keepalive = 1;
+ return setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &keepalive, sizeof keepalive);
+}
+
int UnixOpen(const char *path)
{
int sock = -1;
continue;
}
+ SockTimeout(i, mytimeout);
+ SockKeepalive(i);
+
/* Save socket descriptor.
* Used to close the socket after connect timeout. */
mailserver_socket_temp = i;