WHERE short ScoreThresholdDelete;
WHERE short ScoreThresholdRead;
WHERE short ScoreThresholdFlag;
+#ifdef USE_IMAP
+WHERE short ImapKeepalive;
+#endif
/* flags for received signals */
WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
sigaction (SIGALRM, &act, &oldalrm);
- /* RFC 2060 specifies a minimum of 30 minutes before disconnect when in
- * the AUTHENTICATED state. We'll poll at half that. */
- alarm (900);
+ alarm (ImapKeepalive);
while (waitpid (pid, &rc, 0) < 0 && errno == EINTR)
{
alarm (0); /* cancel a possibly pending alarm */
imap_keepalive ();
- alarm (900);
+ alarm (ImapKeepalive);
}
alarm (0); /* cancel a possibly pending alarm */
** your INBOX in the IMAP browser. If you see something else, you may set
** this variable to the IMAP path to your folders.
*/
+ { "imap_keepalive", DT_NUM, R_NONE, UL &ImapKeepalive, 900 },
+ /*
+ ** .pp
+ ** This variable specifies the maximum amount of time in seconds that mutt
+ ** will wait before polling open IMAP connections, to prevent the server
+ ** from closing them before mutt has finished with them. The default is
+ ** well within the RFC-specified minimum amount of time (30 minutes) before
+ ** a server is allowed to do this, but in practice the RFC does get
+ ** violated every now and then. Reduce this number if you find yourself
+ ** getting disconnected from your IMAP server due to inactivity.
+ */
{ "imap_list_subscribed", DT_BOOL, R_NONE, OPTIMAPLSUB, 0 },
/*
** .pp