Example from real life


From Roubdcube, I serach "milan" in full message (body & headers)

Logs :

Apr 3 10:24:01 gjserver dovecot[29778]: imap(jom@grosjo.net)<30311><4pACp52FfCF/AAAB>: Query : ( bcc:milan OR body:milan OR cc:milan OR from:milan OR message-id:milan OR subject:milan OR to:milan OR uid:milan )
Apr 3 10:24:01 gjserver dovecot[29778]: imap(jom@grosjo.net)<30311><4pACp52FfCF/AAAB>: Query: 81 results in 2 ms

81 results is correct

but Roundcube times out


from command line, I do :

doveadm search -u jom@grosjo.net mailbox inbox text milan

output

doveadm(jom@grosjo.net): Info: Query : ( bcc:inbox OR body:inbox OR cc:inbox OR from:inbox OR message-id:inbox OR subject:inbox OR to:inbox OR uid:inbox ) AND ( bcc:milan OR body:milan OR cc:milan OR from:milan OR message-id:milan OR subject:milan OR to:milan OR uid:milan )
doveadm(jom@grosjo.net): Info: Query: 1 results in 1 ms
d82b4b0f550d38593644000095331209 847
d82b4b0f550d38593644000095331209 1569
d82b4b0f550d38593644000095331209 2260
d82b4b0f550d38593644000095331209 2575
d82b4b0f550d38593644000095331209 2811
d82b4b0f550d38593644000095331209 2885
d82b4b0f550d38593644000095331209 3038
d82b4b0f550d38593644000095331209 3121
d82b4b0f550d38593644000095331209 3170

1 - The query is wrong

2 - teh last line "d8...209 3170" gets repeated for ages





 


On 2019-04-02 16:30, Timo Sirainen wrote:

On 2 Apr 2019, at 6.38, Joan Moreau via dovecot <dovecot@dovecot.org> wrote:

Further on this topic:



When choosing any headers in the search box, dovecot core calls the plugin TWICE (and returns the results quickly, but not immediatly after getting the IDs from the plugins)

When choosing the BODY search, dovecot core calls the plugin ONCE (and never returns) (whereas the plugins returns properly the IDs)


If we simplify this, do you mean this calls it once and is fast:

doveadm search -u user@domain mailbox inbox body helloworld

But this calls twice and is slow:

doveadm search -u user@domain mailbox inbox text helloworld

And what about searching e.g. subject? :

doveadm search -u user@domain mailbox inbox subject helloworld

And does the slowness depend on whether there were any matches or not?

This is based on GIT version. (previous versions were working properly)

Previous versions were fast? Do you mean v2.3.5?