servers like the particular version of dovecot I tried yesterday).
. Don't attempt to poll mailboxes with connections that haven't yet
authenticated.
. Recognize NO responses again (silly typo, spotted by Charlie Allom)
if (!ascii_strncasecmp("OK", s, 2))
return IMAP_CMD_OK;
- if (!ascii_strncasecmp("NO", s, 3))
+ if (!ascii_strncasecmp("NO", s, 2))
return IMAP_CMD_NO;
return IMAP_CMD_BAD;
idata = (IMAP_DATA*) ctx->data;
/* try IDLE first */
- if (mutt_bit_isset (idata->capabilities, IDLE)
+ if (option (OPTIMAPIDLE) && mutt_bit_isset (idata->capabilities, IDLE)
&& (idata->state != IMAP_IDLE
|| time(NULL) >= idata->lastread + ImapKeepalive))
{
dprint (1, (debugfile, "imap_split_path: Error parsing %s\n", path));
return -1;
}
- if (!(*hidata = imap_conn_find (&(mx.account), option (OPTIMAPPASSIVE) ? M_IMAP_CONN_NONEW : 0)))
+ if (!(*hidata = imap_conn_find (&(mx.account), option (OPTIMAPPASSIVE) ? M_IMAP_CONN_NONEW : 0))
+ || (*hidata)->state < IMAP_AUTHENTICATED)
{
FREE (&mx.mbox);
return -1;
** your INBOX in the IMAP browser. If you see something else, you may set
** this variable to the IMAP path to your folders.
*/
+ { "imap_idle", DT_BOOL, R_NONE, OPTIMAPIDLE, 1 },
+ /*
+ ** .pp
+ ** When \fIset\fP, mutt will attempt to use the IMAP IDLE extension
+ ** to check for new mail in the current mailbox. Some servers
+ ** (dovecot was the inspiration for this option) react badly
+ ** to mutt's implementation. If your connection seems to freeze
+ ** up periodically, try unsetting this.
+ */
{ "imap_keepalive", DT_NUM, R_NONE, UL &ImapKeepalive, 900 },
/*
** .pp
OPTIGNORELISTREPLYTO,
#ifdef USE_IMAP
OPTIMAPCHECKSUBSCRIBED,
+ OPTIMAPIDLE,
OPTIMAPLSUB,
OPTIMAPPASSIVE,
OPTIMAPPEEK,