0

We store a bcc of every outsent mail in a mailbox and we store the Message-ID in our DB.

We have a web page that gets the sent mail from imap using the message-id using "SEARCH HEADER Message-ID "

On our old Zimbra mail server this was reasonably fast, but we're in the middle of migrating to dovecot with Solr FTS and every search on this huge mailbox (currently 4462637 messages) takes ~30 seconds.

If I issue a SEARCH HEADER command I see in solr.log:

2021-11-30 13:03:14.053 INFO  (qtp1299327689-23) [   x:dovecot] o.a.s.c.S.Request [dovecot]  webapp=/solr path=/select params={q={!lucene+q.op%3DAND}hdr:64jf4CStuxzUvATjBbRVP3IbJnMbEguVXzOa1OSmjIg&fl=uid,score&sort=uid+asc&fq=%2Bbox:c92f64f79f0d1ed01e6d5b314f04886c+%2Buser:hostmasterlog&rows=5324656&wt=xml} hits=1 status=0 QTime=22

but then I see imap process with ~100% cpu running for 30 seconds before I get the result. Any idea if and how I can shorten the time for SEARCH HEADER?

user997904
  • 161
  • 3

0 Answers0