View Issue Details

IDProjectCategoryView StatusLast Update
0005620SOGoActiveSyncpublic2023-01-25 17:55
Reporterbgaussen Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
PlatformAppleOSiOSOS Version16
Product Version5.7.1 
Summary0005620: EAS server search fails
Description

Running SOGo on a mallow installation, I experience issues with EAS servers searches that don't return any results.
Enabling EAS debug and IMAP logging I extracted the following relevant logs, with a 501 error code answer to EAS request:

mailcowdockerized-sogo-mailcow-1 | Oct 6 17:17:17 90a0cb111729 sogod [55]: <0x0x55aacaef50d0[SOGoActiveSyncDispatcher]> EAS - request for device TK8BPB39TT36L9HIRFF63UHEOG: <?xml version="1.0"?>
mailcowdockerized-sogo-mailcow-1 | Oct 6 17:17:17 90a0cb111729 syslog-ng[9]: Error processing log message: <!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/&quot;>
mailcowdockerized-sogo-mailcow-1 | <unknown xmlns="FolderHierarchy:">
mailcowdockerized-sogo-mailcow-1 | <unknown>18C9FEF4-7858-48C4-BF82-BBCBC9BCAF97</unknown>
mailcowdockerized-sogo-mailcow-1 | <unknown>
mailcowdockerized-sogo-mailcow-1 | <unknown>
mailcowdockerized-sogo-mailcow-1 | <unknown>
mailcowdockerized-sogo-mailcow-1 | <Class>Email</Class>
mailcowdockerized-sogo-mailcow-1 | <CollectionId>mail%2F614be7007a976a595f000000c147d4d9</CollectionId>
mailcowdockerized-sogo-mailcow-1 | <unknown>to:"X1234x4321" OR cc:"X1234x4321" OR from:"X1234x4321" OR subject:"X1234x4321" OR "X1234x4321"</unknown>
mailcowdockerized-sogo-mailcow-1 | </unknown>
mailcowdockerized-sogo-mailcow-1 | <unknown>
mailcowdockerized-sogo-mailcow-1 | <unknown>0-99</unknown>
mailcowdockerized-sogo-mailcow-1 | <unknown/>
mailcowdockerized-sogo-mailcow-1 | </unknown>
mailcowdockerized-sogo-mailcow-1 | </unknown>
mailcowdockerized-sogo-mailcow-1 | </unknown>
mailcowdockerized-sogo-mailcow-1 | </unknown>
mailcowdockerized-sogo-mailcow-1 |
mailcowdockerized-sogo-mailcow-1 | DITY 1500157820)
mailcowdockerized-sogo-mailcow-1 | Oct 6 17:17:17 90a0cb111729 2022-10-06 17:17:17.499 sogod[55:55] EXCEPTION: <NSException: 0x55aacae92d80> NAME:NSInvalidArgumentException REASON:-[SOGoActiveSyncDispatcher processunknown:inResponse:]: unrecognized selector sent to instance 0x55aacaef50d0 INFO:(null)
mailcowdockerized-sogo-mailcow-1 | Oct 6 17:17:17 90a0cb111729 sogod [55]: ::ffff:161.105.234.66, ::ffff:161.105.234.66 "POST /SOGo/Microsoft-Server-ActiveSync?User=ben@trez.org&DeviceId=TK8BPB39TT36L9HIRFF63UHEOG&DeviceType=iPhone&Cmd=Find HTTP/1.0" 501 0/220 0.009 - - 2M - 11

Please ask if more or more precise logs needed.

Steps To Reproduce

Search a SOGo mailbox from iOS 16 mail client. Only local results shown.

TagsNo tags attached.

Activities

mayk

mayk

2022-11-06 14:17

reporter   ~0016340

Can confirm. I test on ios 16.x and only local mails (within defined sync range) are returned. Testing this on older ios (version 12) works.
Tested and confirm breakage with ios mail app, outlook ios app and bluemail on ios . All on version 16. Ios mail app , and bluemail on ios 12 work correctly.

There must be a change in ios, as when i test this against another setup with z-push, the behavior is exactly the same.

tfu

tfu

2022-11-11 19:24

reporter   ~0016384

This is not yet implemented. Depends on https://github.com/libwbxml/libwbxml/pull/86.

sebastien

sebastien

2023-01-25 17:55

administrator   ~0016599

Hi @tfu,

Thanks for the feedback, It seems that PR has been merged. Installed the lib but it seems somes changes are needed in the code also :

  • Add processFind:inResponse: in SOGoActiveSyncDispatcher (call processSearch in that)
  • Check Class for name in processSearch for Email
  • Update _qualifierFromMailboxSearchQuery and extract FreeText to get subject, from and text

For those steps it's ok. However the response provided by SOGo seems to be ok but iOS still displays "no results".

Any idea of where to get documentation ?

Here is the search EAS request :

&lt;!DOCTYPE ActiveSync PUBLIC &quot;-//MICROSOFT//DTD ActiveSync//EN&quot; &quot;http://www.microsoft.com/&quot;>
&lt;Find xmlns=&quot;Find:&quot;>
 &lt;SearchId>2C344390-3A86-47B2-8502-FC90F8417645&lt;/SearchId>
 &lt;ExecuteSearch>
  &lt;MailBoxSearchCriterion>
   &lt;Query>
    &lt;Class xmlns=&quot;AirSync:&quot;>Email&lt;/Class>
    &lt;CollectionId xmlns=&quot;AirSync:&quot;>mail%2Fc8a2ed063d135063c3300000c0848020&lt;/CollectionId>
    &lt;FreeText>to:&quot;Test&quot; OR cc:&quot;Test&quot; OR from:&quot;Test&quot; OR subject:&quot;Test&quot; OR &quot;Test&quot;&lt;/FreeText>
   &lt;/Query>
   &lt;Options>
    &lt;Range>0-99&lt;/Range>
    &lt;DeepTraversal/>
   &lt;/Options>
  &lt;/MailBoxSearchCriterion>
 &lt;/ExecuteSearch>
&lt;/Find>

and extract of the response :

&lt;!DOCTYPE ActiveSync PUBLIC &quot;-//MICROSOFT//DTD ActiveSync//EN&quot; &quot;http://www.microsoft.com/&quot;>
&lt;Search xmlns=&quot;Search:&quot;>
 &lt;Status>1&lt;/Status>
 &lt;Response>
  &lt;Store>
   &lt;Status>1&lt;/Status>
   &lt;Result>
    &lt;LongId>mail%2Fc8a2ed063d135063c3300000c0848020+19&lt;/LongId>
    &lt;CollectionId xmlns=&quot;AirSync:&quot;>mail%2Fc8a2ed063d135063c3300000c0848020&lt;/CollectionId>
    &lt;Properties>
     &lt;To xmlns=&quot;Email:&quot;>&quot;s m&quot; &lt;xxx@www.org>&lt;/To>
     &lt;DisplayTo xmlns=&quot;Email:&quot;>s m&lt;/DisplayTo>
     &lt;From xmlns=&quot;Email:&quot;>&quot;s m&quot; &lt;xxx@www.org>&lt;/From>
     &lt;Subject xmlns=&quot;Email:&quot;>coucou &lt;a href=&quot;sqdq&quot;>sdqd&lt;/a>&lt;/Subject>
     &lt;ThreadTopic xmlns=&quot;Email:&quot;>coucou &lt;a href=&quot;sqdq&quot;>sdqd&lt;/a>&lt;/ThreadTopic>
     &lt;DateReceived xmlns=&quot;Email:&quot;>2022-11-14T13:26:33.000Z&lt;/DateReceived>
     &lt;Importance xmlns=&quot;Email:&quot;>1&lt;/Importance>
     &lt;Read xmlns=&quot;Email:&quot;>0&lt;/Read>
     &lt;MessageClass xmlns=&quot;Email:&quot;>IPM.Note&lt;/MessageClass>
     &lt;ContentClass xmlns=&quot;Email:&quot;>urn:content-classes:message&lt;/ContentClass>
     &lt;Reply-To xmlns=&quot;Email:&quot;>s m &lt;xxx@www.org>&lt;/Reply-To>
     &lt;InternetCPID xmlns=&quot;Email:&quot;>65001&lt;/InternetCPID>
     &lt;Flag xmlns=&quot;Email:&quot;>
      &lt;FlagStatus>0&lt;/FlagStatus>
     &lt;/Flag>
     &lt;Categories xmlns=&quot;Email:&quot;/>
     &lt;ConversationId xmlns=&quot;Email2:&quot;>PGUwNjAtNjM3MjQyMDAtMy03MjMzNTQwMEAyNDU1MjQ1Mjk+&lt;/ConversationId>
     &lt;LastVerbExecuted xmlns=&quot;Email2:&quot;>0&lt;/LastVerbExecuted>
     &lt;NativeBodyType xmlns=&quot;AirSyncBase:&quot;>1&lt;/NativeBodyType>
    &lt;/Properties>
   &lt;/Result>
...
   &lt;Range>0-23&lt;/Range>
   &lt;Total>24&lt;/Total>
  &lt;/Store>
 &lt;/Response>
&lt;/Search>

Issue History

Date Modified Username Field Change
2022-10-07 09:15 bgaussen New Issue
2022-11-06 14:17 mayk Note Added: 0016340
2022-11-11 19:24 tfu Note Added: 0016384
2023-01-25 17:55 sebastien Note Added: 0016599