From: Timo Sirainen Date: Fri, 13 Mar 2020 10:24:39 +0000 (+0200) Subject: imap: Fix using SEARCH RELEVANCY option with MIN/MAX X-Git-Tag: 2.3.11.2~524 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f40704db6f601f7053baca42f6c8bf60fae2e170;p=thirdparty%2Fdovecot%2Fcore.git imap: Fix using SEARCH RELEVANCY option with MIN/MAX It should return only the one MIN/MAX mail's relevancy, not all of them. Similarly the SEARCHRES $ should be updated only to the MIN/MAX mail, not all mails. --- diff --git a/src/imap/imap-search.h b/src/imap/imap-search.h index f8d14c9588..7e89513360 100644 --- a/src/imap/imap-search.h +++ b/src/imap/imap-search.h @@ -14,10 +14,11 @@ enum search_return_options { SEARCH_RETURN_UPDATE = 0x0080, SEARCH_RETURN_PARTIAL = 0x0100, SEARCH_RETURN_RELEVANCY = 0x0200 -/* Options that don't return any seq/uid results */ +/* Options that don't return any seq/uid results, and also don't affect + SEARCHRES $ when combined with MIN/MAX. */ #define SEARCH_RETURN_NORESULTS \ (SEARCH_RETURN_ESEARCH | SEARCH_RETURN_MODSEQ | SEARCH_RETURN_SAVE | \ - SEARCH_RETURN_UPDATE) + SEARCH_RETURN_UPDATE | SEARCH_RETURN_RELEVANCY) }; struct imap_search_context {