Self-hosted /e/ Cloud & Mail app

Hi,

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.

After some tests with a /e/ Pie phone (this one) and self-hosted /e/ Cloud (this commit), I’ve found that :

  • 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 :frowning:.

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.mail and 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 :cowboy_hat_face:)
  • 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 : cd /data/data/foundation.e.mail, rm -rf * (just in case …), and then tar -xzf /sdcard/mail_arch.tgz
  • launched Mail app : OK :partying_face: !
  • 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 :slight_smile:

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 :wink:

(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.

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

1 Like

thanks for this ‘HowTo’. But the best way and easiest way is NOT adding a selfhosted NC under /e/ account. Better using WebDav account for calendar and contacts sync and NC client for the rest (pictures, videos, documents … )
And by the way, this well know bug should be solved soon. But anyway, again, thanks for your workaround

Thanks !

I agree, with a standard NextCloud instance xDAV will be the best choice.

Here, I’ve setup a whole /e/ Cloud system in order to benefit from integration in /e/ phones, so I wanted to avoid xDAV clients :wink:

I’ll be happy to conduct some tests when the bug will be resolved :slight_smile:

Update : with latest unofficial build I could test on my santoni device (List of UNOFFICIAL /e/ builds), Mail is no longer hanging with self-hosted foreign account :slight_smile:
Instead, Mail account isn’t automatically setup anymore, allowing me to set it up manually.
And everything is working as expected :slight_smile: