25 Aug
2025
25 Aug
'25
3:08 p.m.
On 25/08/2025 12:48, Ákos Szőts via dovecot wrote:
Hi everyone, These two IMAP search commands return different values: a SEARCH UNSEEN * SEARCH 38 61 62 63 65 69 74 75 76 82 86 87 102 120 121 141 142 143 144 145 146 158 159 160 a SEARCH UNKEYWORD \Seen * SEARCH [All email IDs in the mailbox] a SEARCH KEYWORD \Seen * SEARCH [Empty] According to [1]RFC 3501, in my interpretation, these two should be equal: > UNSEEN > Messages that do not have the \Seen flag set. Can you tell me what is causing this difference? I also ran force-resync on all my mails, just to be sure. Akos
Hi Akos
keywords are a specific type of flag. As defined by the RFC:
A keyword is defined by the server implementation. Keywords do not begin with "\".
My interpretation is that for searching for \Seen or \Unseen you should use the SEEN or UNSEEN search criteria and not the KEYWORD or UNKEYWORD criteria.
John
On 25/08/2025 12:48, Akos Szo"ts via dovecot wrote:
Hi everyone,
These two IMAP search commands return different values:
a SEARCH UNSEEN
* SEARCH 38 61 62 63 65 69 74 75 76 82 86 87 102 120 121 141 142 143 144
145 146 158 159 160
a SEARCH UNKEYWORD \Seen
* SEARCH [All email IDs in the mailbox]
a SEARCH KEYWORD \Seen
* SEARCH [Empty]
According to [1]RFC 3501, in my interpretation, these two should be equal:
> UNSEEN
> Messages that do not have the \Seen flag set.
Can you tell me what is causing this difference? I also ran force-resync
on all my mails, just to be sure.
Akos
Hi Akos
keywords are a specific type of flag. As defined by the RFC:
A keyword is defined by the server implementation. Keywords do not begin with "\".
My interpretation is that for searching for \Seen or \Unseen you should use the SEEN or UNSEEN search criteria and not the KEYWORD or UNKEYWORD criteria.
John