Score:0

Dovecot slow searching a huge mailbox

be flag

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?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.