mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.75k stars 1.17k forks source link

Do not recommend using ActiveSync on Android #4594

Open ValdikSS opened 2 years ago

ValdikSS commented 2 years ago

Summary

It's better to recommend configuring Mailcow with IMAP+CalDav+CardDav rather than ActiveSync.

Motivation

SoGo ActiveSync implementation have numerous flaws and incompatibilities with Android implementation.

Bugs that hit me:

I can confirm this issue on SOGo 5.0.1 and Android 9. Was aroused by this unpleasant surprise when multiple "Work" or "Cell" numbers of my contacts got silently discarded on saving/importing over ActiveSync.

Can confirm on SOGo 5.0.1. I've exported vcard using Contacts application on Android, tried to import it via web interface of SOGo and got almost all contact names trimmed to 15-16 characters.

The latest bug was closed as WONTFIX because apparently Android's vcf is not fully RFC-compatible.

Additional context

No response

andryyy commented 2 years ago

„On Android“ is too vague.

I think there is a lot of emotion in this FR that should be put into a punching ball or something. :)

ValdikSS commented 2 years ago

„On Android“ is too vague.

I had the issues mentioned above on three phones with different Android versions. The first bug is severe, as it silently discards the phone number information. It affects both import stage and just adding the number from Android interface. It took some time for me to spot that something was wrong after importing the contacts to SoGo and debug the issue.

Also I remember another bug with repetitive calendar events does not show on Android when using ActiveSync. This one: https://www.sogo.nu/bugs/view.php?id=5506

No such issues with IMAP+CalDav+CardDav.

ValdikSS commented 2 years ago

I think there is a lot of emotion in this FR that should be put into a punching ball or something. :)

You're kinda right, I filled this FR after broken/incomplete vcard import bug was closed today as WONTFIX after 10 years since it was filled in 2012. It would be fine to refuse importing non-RFC-compliant files and show error message on import without any action, but SoGo instead imports the file, resulting in inconsistent data. When I happen to hit this bug, I did not spot the issue right away because the stripping happens only for longer contact names.

I filled this issue with the intend to make a pull request with documentation changes and fix it some day in the closest future. As Mailcow already provides much more reliable IMAP+CalDav+CardDav, which work on Android much better than ActiveSync, I see no reason to recommend ActiveSync configuration.

When I initially installed Mailcow and configured everything as recommended in the documentation, I hit these three bugs in a row, and I debugged and understood that the issue is in SoGo and its ActiveSync implementation, I marked SoGo as an unreliable software (because my configuration and workflow is pretty common and if the software has such blatant bugs, I deem that the developers don't use their own software) at least for Android, and switched to alternative protocols. If you tend to disagree, please state your position, and I won't prepare the documentation changes in this case. I only want to make software more reliable.

ValdikSS commented 2 years ago

I remember the other strange issue with the gmail app + ActiveSync configuration: the reply-to header is always ignored and the reply is always performed to the From address.

mrgohin commented 2 years ago

Even ActiveSync provided my Exchange Online does a lot weird shit on for example Samsung Android. Worst case scenario uno is that Android only partial syncs stuff over MAPI with a ton of delay and absolute worst case is that bi-directional sync stops completely so nothing from phone is pushed back to server or vice versa. Guess no solution in sight except don't using ActiveSync.

BigMichi1 commented 2 years ago

Actually I can recommend ActiveSync and not having any single problem on many devices that are connected to MailCow installation. The only difference is that we are not using the android stock app, instead we use on all phones Nine https://www.9folders.com/en/index.html

mrgohin commented 2 years ago

Thats good to know that there exists working apps. You have to consider that not everyone is willing to use Google Play Store (or even alternatives) so they will fallback to vanilla Android implementation.

StephanGeberl commented 1 year ago

I do have some major Issues with Android and Nine App. Every time I setup a Profile with Nine the sync works for a few hours until the folllowing messages show on the logon screen and stop sync: Out of memory: Killed process 3274 (sogod) ... image I don't know if I'am doing something wrong.This is a standard installation (newest version). Does anyone know if there is a log file (trace) to get more information?

StephanGeberl commented 1 year ago

Update: found this in the SOGo Log:

8/12/2023, 01:26:48 PM notice [2260]: \ SOGo\ terminating app, vMem size limit (385 MB) has been reached (currently 2272 MB)
08/12/2023, 01:26:48 PM notice [2260]: 192.168.30.5 "POST /SOGo/Microsoft-Server-ActiveSync?jQAJBBBOaW5lMzQyQkEzRjNFNkM2BAAAAAAHQW5kcm9pZAcBAA== HTTP/1.0" 200 1080/124 772.506 - - 4145M - 12
08/12/2023, 01:26:48 PM notice [2260]: [ERROR] <0x0x555cdb021310[WOHttpTransaction]> client disconnected during delivery of response for <WORequest[0x0x555cdad5f0f0]: method=POST uri=/SOGo/Microsoft-Server-ActiveSync?jQAJBBBOaW5lMzQyQkEzRjNFNkM2BAAAAAAHQW5kcm9pZAcBAA== app=SOGo rqKey=Microsoft-Server-ActiveSync rqPath=(null)> (len=1080): the socket was shutdown
08/12/2023, 01:26:36 PM notice [9]: [WARN] <0x0x555cdb1de4d0[WOWatchDogChild]> pid 2362 has been hanging in the same request for 10 minutes
ciroiriarte commented 7 months ago

No such issues with IMAP+CalDav+CardDav.

Out of curiosity, would that require 3 different apps on the phone?. Will that handle 2FA or app passwords?

ValdikSS commented 7 months ago

would that require 3 different apps on the phone

Only 2: your email client and CalDav+CardDav sync like davx. Or only a single if your email application supports CalDav/CardDav.

app passwords?

Yes.

mrgohin commented 7 months ago

I don't know if it helps but I use following stack:

e-mail: FairEmail calendar: Etar contact: in-build grapheneos/android sync: DAVx5

In FairEmail I go to main > wizard > other provider and enter my account details. After that it just uses auto discovery to setup my account thats it. As far as I am aware IMAP IDLE extension kinda does what ActiveSync does but I am open for correction.

DAVx5 is a bit manual because of SOGo but in total only one more step entering the custom url to SOGo.

I use this since two years now and from the moment I set it up I never touched it again. Just werks.