404 error when accessing /Microsoft-Server-ActiveSync (possibly caused by user-agent string)

Hello everyone!

UCS: 4.2-4 errata426
App Center compatibility: 4
Installed: letsencrypt=1.1.2-8 mailserver=11 open-xchange-text=7.8.4-ucs1 oxseforucs=7.8.4-ucs10 samba4=4.6
Upgradable: oxseforucs

I am running into a strange and unusual problem, when clients try to get the OPTIONS via the URL our.domain.tld/Microsoft-Server-ActiveSync. Depending on the user-agent string the request is served or it is rejected with a 404 by apache.

curl -i -u 'user:pass' -A "Thunderbird ActiveSync Lightnin" -X OPTIONS https://our.domain.tld/Microsoft-Server-ActiveSync/

HTTP/1.1 200 OK
Date: Thu, 20 Sep 2018 16:27:48 GMT
Server: grizzly/2.3.29
Strict-Transport-Security: max-age=15768000
X-Robots-Tag: none
Public: OPTIONS, POST
MS-ASProtocolVersions: 2.5,12.0,12.1
MS-ASProtocolCommands: Sync,FolderCreate,FolderDelete,FolderSync,FolderUpdate,GetAttachment,GetHierarchy,GetItemEstimate,MeetingResponse,MoveItems,Ping,Provision,ResolveRecipients,Search,SendMail,SmartForward,SmartReply,ValidateCert,Settings,ItemOperations
Pragma: no-cache
Allow: GET, HEAD, POST, TRACE, OPTIONS
Content-Length: 0
Via: 1.1 our.server.tld

If I add just one more character to the user-agent string, the request fails:

curl -i -u 'user:pass' -A "Thunderbird ActiveSync Lightning" -X OPTIONS https://our.domain.tld/Microsoft-Server-ActiveSync/

HTTP/1.1 404 Not Found
Date: Thu, 20 Sep 2018 16:31:30 GMT
Server: Openexchange WebDAV
Strict-Transport-Security: max-age=15768000
X-Robots-Tag: none
Content-Length: 0
Via: 1.1 our.server.tld

Unfortunately the logfiles haven’t been to helpful and I have been digging around the net and OXpedia for some days now. If anybody knows what could cause this behaviour, I will gladly accept any pointers to possible solutions I haven’t thought of yet.

If any logs or information is needed to further investigate this problem, just let my know.

Best regards,

Falk

Hi Falk,

the OX integration on UCS is currently using the HTTP user agent to distinguish between HTTP requests for the OX middle ware and CalDAV requests. A list of user agent substrings that are interpreted as CalDAV request can be found in the UCR variable ox/caldav/useragent/whitelist. The substring Lightning is also part of this list, which might cause your problem.
You can alter the UCR variable according to your needs (remove Lightning or replace Lightning with a more appropriate string).

Best regards,

Sönke

Mastodon