Dovecot, Solr (FTS) and iOS body search

Ben Howard bh483031 at icloud.com
Mon Dec 13 16:29:54 UTC 2021


I had a question about full text search with Dovecot, Solr with iOS as a client (the built in default mail client). 

Does anyone happen to know if it's possible to get the iOS mail client to search bodies of email via IMAP with Dovecot and Solr on the server? I've looked at the IMAP queries being sent to Solr and regardless of iOS settings only the subject or to/cc/from seem to get queried. i.e.: 

test search query: Foobar

Request [dovecot]  webapp=/solr path=/select params={q={!lucene+q.op%3DAND}subject:Foobar&fl=uid,score&sort=uid+asc (trimmed for space)

test search query with 'message' selected as search via the GUI in iOS mail app: Foobar

2021-12-12 22:16:43.840 INFO  (qtp1309129055-21) [   x:dovecot] o.a.s.c.S.Request [dovecot]  webapp=/solr path=/select params={q={!lucene+q.op%3DAND}to:Foobar+OR+cc:Foobar+OR+from:Foobar+OR+subject:Foobar&fl=uid,score&sort=uid+asc (trimmed for space)

I also put Wireshark between an iOS device and the mail server to see the IMAP commands being issued client side and it matches with what Dovecot is seeing - i.e. only to/cc/from/subject no body queries.

dovecot version: 2.3.17.1 (476cd46418), solr 8.11.0 and fts_enforced = yes

Is it just not possible for the iOS mail client to search for keywords within the body of emails via IMAP/Dovecot/Solr? Any pointers, or just knowing I should give up, would be most gratefully received.

Thanks


More information about the dovecot mailing list