charset-specific searches, and continuation lines

Eric Abrahamsen eric at ericabrahamsen.net
Fri Sep 5 03:44:09 UTC 2014


Michael M Slusarz <slusarz at curecanti.org> writes:

> Quoting Eric Abrahamsen <eric at ericabrahamsen.net>:
>
>> While I've got you here, I hope you'll answer one more question: what's
>> the format for searching multiple terms with non-ascii strings? Is it
>> possible in one run to find a utf-8 encoded subject, and a utf-8 encoded
>> body?
>
> IMAP interaction would look like this:
>
> C: . UID SEARCH CHARSET UTF-8 SUBJECT {4}
> S: +OK
> C: aéb BODY {4}
> S: +OK
> C: aéb
> S: * SEARCH XXX
> S: . OK
>
> Even better... if the server supports LITERAL+, you don't have to wait
> for the synchronizing literal which prevents the need to wait for 2
> round-trips from the server:
>
> C: . UID SEARCH CHARSET UTF-8 SUBJECT {4+}
> C: aéb BODY {4+}
> C: aéb[CRLF]
> S: * SEARCH XXX
> S: . OK

Brilliant, thanks a lot! Not something I would have guessed on my own,
and surprisingly hard to find online -- I'm learning to read the RFCs...

Thanks again,
Eric



More information about the dovecot mailing list