From: Brendan Cully Date: Mon, 13 Mar 2006 23:21:51 +0000 (+0000) Subject: Courier fails to send UIDNEXT on SELECT (a violation of RFC 3501 X-Git-Tag: mutt-1-5-12-rel~129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=121b1ff0ec75016c8a4412b185c7d8bce8c223ab;p=mutt Courier fails to send UIDNEXT on SELECT (a violation of RFC 3501 section 6.3.1) - synthesize it if it is missing. --- diff --git a/imap/message.c b/imap/message.c index 3f125700..432af024 100644 --- a/imap/message.c +++ b/imap/message.c @@ -323,6 +323,11 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend) #if USE_HCACHE mutt_hcache_store_raw (hc, "/UIDVALIDITY", &idata->uid_validity, sizeof (idata->uid_validity), imap_hcache_keylen); + if (idata->uidnext < maxuid + 1) + { + dprint (2, (debugfile, "Overriding UIDNEXT: %u -> %u", idata->uidnext, maxuid + 1)); + idata->uidnext = maxuid + 1; + } mutt_hcache_store_raw (hc, "/UIDNEXT", &idata->uidnext, sizeof (idata->uidnext), imap_hcache_keylen); mutt_hcache_close (hc);