enum imapc_capability capabilities;
capabilities = imapc_client_get_capabilities(mbox->storage->client->client);
- if ((capabilities & IMAPC_CAPABILITY_IDLE) == 0 ||
- (flags & MAILBOX_SYNC_FLAG_FULL_READ) != 0) {
+ if (!mbox->initial_sync_done) {
+ /* we just SELECTed/EXAMINEd the mailbox, don't do another
+ NOOP. */
+ } else if ((capabilities & IMAPC_CAPABILITY_IDLE) == 0 ||
+ (flags & MAILBOX_SYNC_FLAG_FULL_READ) != 0) {
/* do NOOP to make sure we have the latest changes before
starting sync. this is necessary either because se don't
support IDLE at all, or because we want to be sure that we