# HG changeset patch # User Timo Sirainen # Date 1297921530 -7200 # Node ID ceab4f233bff2bf95a8ac16408c3975e02a5e1b8 # Parent 0af45e821da1d78fff88f9dd9e28dc66e405d3b6 imapc: When local IDLE is started, force remote server to first check changes with NOOP. This is makes clicking Thunderbird's "get mail" button to check for new mails with servers that don't notify about them immediately after they arrive. diff -r 0af45e821da1 -r ceab4f233bff src/lib-storage/index/imapc/imapc-storage.c --- a/src/lib-storage/index/imapc/imapc-storage.c Sat Feb 12 06:06:32 2011 +0200 +++ b/src/lib-storage/index/imapc/imapc-storage.c Thu Feb 17 07:45:30 2011 +0200 @@ -506,7 +506,12 @@ capa = imapc_client_get_capabilities(mbox->storage->client); if ((capa & IMAPC_CAPABILITY_IDLE) != 0) { - /* we're doing IDLE all the time anyway - nothing to do here */ + /* remote server is already in IDLE. but since some servers + don't notice changes immediately, we'll force them to check + here by sending a NOOP. this helps with clients that break + IDLE when clicking "get mail". */ + imapc_client_mailbox_cmd(mbox->client_box, "NOOP", + imapc_async_callback, mbox->storage); } else { /* remote server doesn't support IDLE. check for changes with NOOP every once in a while. */