Why are you still going through Dovecot for this ?
@ 4.5 million messages you could just reprogram your app to search solr
directly, it will return the uid of the message and you can use that directly in
imap uid fetch.
Scott
-----Original Message-----
From: dovecot <dovecot-bounces at dovecot.org> On Behalf Of Einar Bjarni
Halld?rsson
Sent: Thursday, December 2, 2021 7:47 AM
To: dovecot at dovecot.org
Subject: Re: Searching 30 GB mailbox
>
> If I search for the UID I get
>
> --
> 3 fetch 5166713 ENVELOPE
> 3 BAD Error in IMAP command FETCH: Invalid messageset (0.001 + 0.000
> secs).
> --
> If I run the search in IMAP I get
>
> --
> 4 SEARCH HEADER Messgage-ID
> <64jf4CStuxzUvATjBbRVP3IbJnMbEguVXzOa1OSmjIg at min.isnic.is>
> * SEARCH
> * 4465180 EXISTS
> * 88 RECENT
> 4 OK Search completed (29.674 + 0.000 + 29.523 secs).
> --
>
I just realised I'm misreading the return from the search. Redid it and this
is from telnet
--
3 search header MESSAGE-ID 64jf4CStuxzUvATjBbRVP3IbJnMbEguVXzOa1OSmjIg
* SEARCH 4327049
3 OK Search completed (28.955 + 0.000 + 28.837 secs).
--
Same search from command line
--
doveadm search -u hostmasterlog mailbox INBOX HEADER MESSAGE-ID
64jf4CStuxzUvATjBbRVP3IbJnMbEguVXzOa1OSmjIg
c92f64f79f0d1ed01e6d5b314f04886c 5166713
--
.einar