View Issue Details

IDProjectCategoryView StatusLast Update
0005206SOGoActiveSyncpublic2021-02-05 15:06
Reporterjacotec Assigned Tofrancis  
PriorityhighSeveritymajorReproducibilityalways
Status feedbackResolutionreopened 
PlatformiPhoneOSIOS 14.1 
Product Version5.0.1 
Fixed in Version5.1.0 
Summary0005206: Search via Active Sync does not find text in email bodies
Description

I've seen that the search in emails on our IOS devices is pretty useless as SOGo seems to miss finding the search query in the email bodies.

My backend is a Dovecot server with FullTextSearch realized via Solr. Works perfectly with IMAP Search, also SOGo itself returns any search results in lighning speed when I select the email body as search target in the web GUI.

When I do a test FTS for "Unitymedia", SOGo immediately returns more than a dozen of emails where this word is in the email body. Same for Outlook. Doing the same search on the iPhone, it just returns one email, and that's the one where the search term is in the subject.

Steps To Reproduce
  • iPhone/iPad connected via ActiveSync to SOGo
  • Search for a word which is present in the email bodies of a couple of mails
  • Only mails where the search word is in the subject are returned
Additional Information

This is the EAS search request from the SOGo log with ActiveSync Debug enabled:

<Search xmlns="Search:">
<Store>
<Name>Mailbox</Name>
<Query>
<And>
<Class xmlns="AirSync:">Email</Class>
<CollectionId xmlns="AirSync:">mail%2F584ed4393df2865fdf030000ea44b337</CollectionId>
<FreeText>Unitymedia</FreeText>
<LessThan>
<DateReceived xmlns="Email:"/>
<Value>2018-12-31T10:39:50.000Z</Value>
</LessThan>
</And>
</Query>
<Options>
<Range>0-99</Range>
<BodyPreference xmlns="AirSyncBase:">
<Type>1</Type>
<TruncationSize>500</TruncationSize>
<AllOrNone>0</AllOrNone>
</BodyPreference>
<MIMESupport xmlns="AirSync:">0</MIMESupport>
<DeepTraversal/>
<RebuildResults/>
</Options>
</Store>
</Search>

After that, there is just one result returned (the one with the Word in the Subject)

<Search xmlns="Search:">
<Status>1</Status>
<Response>
<Store>
<Status>1</Status>
<Result>
<LongId>mail%2F584ed4393df2865fdf030000ea44b337+2884</LongId>
<CollectionId xmlns="AirSync:">mail%2F584ed4393df2865fdf030000ea44b337</CollectionId>
<Properties>
<To xmlns="Email:">"my@domain.de" <my@domain.de></To>
<DisplayTo xmlns="Email:">my@domain.de</DisplayTo>
<From xmlns="Email:">"Vodafone Enterprise Pulse" <team@enterprise-pulse.vodafone.de></From>
<Subject xmlns="Email:">Pulse News 09/2019: Unitymedia Übernahme – Office 365 im Test – KFZ-Kooperation – Smart Lock im Feldtest</Subject>
<ThreadTopic xmlns="Email:">Unitymedia Übernahme – Office 365 im Test – KFZ-Kooperation – Smart Lock im Feldtest</ThreadTopic>
<DateReceived xmlns="Email:">2019-09-27T09:05:50.000Z</DateReceived>
<Importance xmlns="Email:">1</Importance>
<Read xmlns="Email:">1</Read>
<MessageClass xmlns="Email:">IPM.Note</MessageClass>
<ContentClass xmlns="Email:">urn:content-classes:message</ContentClass>
<InternetCPID xmlns="Email:">65001</InternetCPID>
<Body xmlns="AirSyncBase:">
<Type>1</Type>
<Truncated>0</Truncated>
<Preview/>
<Data>Guten Tag Herr xxxx
[....]

TagsNo tags attached.

Activities

tfu

tfu

2020-11-30 19:03

reporter   ~0014978

Reference: https://github.com/inverse-inc/sogo/pull/289

jacotec

jacotec

2020-11-30 23:11

reporter   ~0014981

Awesome!!! Thanks �
I hope it'll find its way into 5.0.2.

jacotec

jacotec

2021-02-04 17:43

reporter   ~0015072

Meanwhile the Mailcow project is using the latest master source where this fix is included, but unfortunately it does not work. Searching for a word which appears in e-Mail bodies on my iPhone/iPad (connected via ActiveSync) does only return results where the search word is in the Subject, but not in the body.

Did this fix work on an iPhone/iPad?

tfu

tfu

2021-02-05 15:06

reporter   ~0015073

Verify the sogo.conf for the parameter to enable the search in body-feature (parameter is case-sensitive) SOGoEASSearchInBody = YES
You could set ImapDebugEnabled = YES; to get the generated IMAP-commands into sogo.log (very noisy).
sogo.log should show something like ".... UID SORT (REVERSE ARRIVAL) UTF-8 (NOT DELETED TEXT ".....")

Issue History

Date Modified Username Field Change
2020-11-06 07:55 jacotec New Issue
2020-11-30 19:03 tfu Note Added: 0014978
2020-11-30 23:11 jacotec Note Added: 0014981
2020-12-18 20:48 francis Assigned To => francis
2020-12-18 20:48 francis Status new => resolved
2020-12-18 20:48 francis Resolution open => fixed
2020-12-18 20:48 francis Fixed in Version => 5.1.0
2021-02-04 17:43 jacotec Status resolved => feedback
2021-02-04 17:43 jacotec Resolution fixed => reopened
2021-02-04 17:43 jacotec Note Added: 0015072
2021-02-05 15:06 tfu Note Added: 0015073