in imap4rev1 search, always send an untagged search response, also without matches

required by rfc. i noticed an example doing that in the condstore/qresync rfc.
This commit is contained in:
Mechiel Lukkien
2023-07-24 15:40:04 +02:00
parent bca33c0364
commit bc62aae0e6
2 changed files with 5 additions and 4 deletions

View File

@ -128,6 +128,11 @@ func (c *conn) cmdxSearch(isUID bool, tag, cmd string, p *parser) {
})
if eargs == nil {
// In IMAP4rev1, an untagged SEARCH response is required. ../rfc/3501:2728
if len(uids) == 0 {
c.bwritelinef("* SEARCH")
}
// Old-style SEARCH response. We must spell out each number. So we may be splitting
// into multiple responses. ../rfc/9051:6809 ../rfc/3501:4833
for len(uids) > 0 {