I missed adding the flag to one of the imap_exec() calls inside the
loop, when a different server is encountered in the mailboxes list.
{
/* Send commands to previous server. Sorting the buffy list
* may prevent some infelicitous interleavings */
- if (imap_exec (lastdata, NULL, IMAP_CMD_FAIL_OK) == -1)
+ if (imap_exec (lastdata, NULL, IMAP_CMD_FAIL_OK | IMAP_CMD_POLL) == -1)
dprint (1, (debugfile, "Error polling mailboxes\n"));
lastdata = NULL;