Disclaimer : this is not a guide nor a how-to, just a user feedback to help others.
As some have noticed (see here), Mail app doesn’t like foreign Nexcloud or self-hosted /e/ Cloud.
- adding an self-hosted at phone setup leads to a looping-crash Mail app; however everything else appears to work as expected
- skipping the account at setup, manually adding the account to Mail app, and then adding the self-hosted account with Setup app, leads to some items not synchronized (especially files)
Found that Mail account creation is looping with missing info (you can see that in app database, on phone).
Unfortunately, had not enough free time to dig into Java code .
Before resigning myself to give up Mail and use another application (I choosed FairEmail), I conducted some successful, but out of beaten paths, tests.
It’s now working fine, but I don’t know if it could be reproduced elsewhere …
First, while my phone was still “linked” with /e/ Foundation Cloud (@e.email address), I added my own self-hosted /e/ Cloud email address to Mail app.
After some checks, I made a backup of Mail app datas :
- on phone, force stop Mail app
- adb in root mode
- adb shell (# prompt for root) :
cd /data/data/foundation.e.mailand then
tar -czf /sdcard/mail_arch.tgz *
- removed /e/ Foundation account from phone, rebooted, checked everything’s gone (contacts, notes, agenda, …) but files are being kept
- wiped Mail data : adb root shell then
rm -rf /data/data/foundation.e.mail/*(redneck style )
- added my self-hosted /e/ Cloud account, checked everything’s working fine and get synchronized (1), except mails of course
- I didn’t launch the Mail app (useless), instead force-stopped it and restored my backup from adb root shell :
rm -rf *(just in case …), and then
tar -xzf /sdcard/mail_arch.tgz
- launched Mail app : OK !
- checked again everything’s working fine (created file, event, task, note, contact, …)
I didn’t push too far by deleting the /e/ Foundation email account (@e.email). Besides, I’m still using it for community forums, GitLab, …
However I changed some settings, added accounts, still working fine
I wonder if Mail app would continue to work without /e/ foundation account ? Maybe not …
Also, Mail app seems to be somehow bound with DAV files management, so maybe waiting for a complete synchronization before using Mail helped ?
Hope this feedback may help !
Also, I own a /e/ Foundation account, a self-hosted /e/ Cloud, a Pie testing phone … so I can conduct further testing if requested
(1) Closed all browsers to my self-hosted /e/ to avoid noise, and then from my /e/ Cloud server :
docker logs --details --follow --tail 40 nginx .
Complete sync can take time, especially files : some delay to start, takes time to complete.