Mail App - no automatic IMAP sync with single (non Murena.io) account

Hi,

I did not succeed with configuring the /e/OS mail app to automatically perform IMAP sync. This is my configuration:

  • Device: Fairphone4
  • OS: e-3.0.4-a14-20250708507308-official-FP4
  • Rooted: no
  • Bootloader: locked
  • Mail app version: 6.711-2
  • Main account: a non murena.io Nextcloud account
  • Mail synchronization setting for that account: seems to have no impact
  • Global synchronization setting for the phone: on
  • Mail app settings: imported from another phone on which the app in version 5.600 synchronized correctly with the IMAP account

The symptom is: neither IMAP push nor polling seems to work. Even after waiting for some 30 minutes, there is no notification of new emails (and they also do not show up in the inbox on the phone). Only after manual synchronization (swiping down), new emails are shown, i.e. the login parameters are correct.

I also tried manual configuration of the app (without importing) on a FP4 with 2.2-r-20240719418592-dev-FP2 (Mail app updated via App Lounge to 6.711-2 as well) with the same results.

Did I miss anything?

Kind regards
Ingolf

A good idea is to experiment with a PC mail client like Claws Mail for that to find out the right settings, especially for authentication and used security layers. (note: the Thunderbird PC application is not the best because Thunderbird is not able to receive push notifications, they only poll and poll and poll, even IMAP servers.) When you have a PC mail client working you can then easily transfer these configuration settings to the mobile client. This PC mail client is also a good tool for testing the mobile client.

The stock Mail app is able to use polling (this is the default) or receiving push notifications very well. When you configured receiving push notifications you should switch off the so called background synchronization (this is nothing else than cyclic polling) to reduce a lot of meaningless network traffic. This option is in the Mail app in the settings under General, Network - Background sync. If you switched this off polling stops but all your accounts remain working and you can refresh them anytime manually. Note: when you have multiple accounts and not all can receive push notifications so that some still need polling this means that all accounts are still polled, even when they receive push notifications.

For receiving push notifications from an IMAP server the server needs to know that a given client is still alive and wants to receive them. For this a client must send short keep alive notifications from time to time to the server. The interval for sending these notifications depends on the server alone and is in the most cases not documented. You can start with some minutes but you should increase this time as much as you can to reduce network traffic and energy consumption. Most servers work well with an interval between 15 and 30 minutes. This option is in the Mail app in the settings for a concrete account under Fetching mail, Advanced - Refresh IDLE connection. If this option is too long the server forgets the client and doesn’t send push notifications anymore.

Mail App has no inherent IMAP issues.

Can you disclose the provider of that mail/imap account you either import or setup manually? does it offer autoconfig (a standard) ?

Thanks, @irrlicht and @tcecyk for your messages.

On several Linux machines, IMAP push works well with the IMAP server. The same is true for a smartphone running an older version of /e/OS (Mail app in version 5.600). I exported that mail configuration and imported it on the phone with version 6.711-2 of the Mail app.

As by your recommendation, I disabled background sync and set the keep alive interval to 6 minutes (it had been 24mins before). Still no notification on new mails – even when a mail is received on the IMAP server just shortly after the phone is has finished booting (so there should not be a keep alive timeout). The Mail app not even displays new mail which has accumulated while the phone was off directly after starting.

My IMAP server is imap.steinba.ch which is an alias for mail.jitcreatives.de. AFAIK it does not offer autoconfig – at least when manually configuring the Mail app, automatic set-up had not been possible.

Kind regards
Ingolf

Some more observations:

  • The old smartphone “immediately” notices new mail in the inbox.
  • After purging the storage of the Mail app and performing manual configuration anew, the displayed inbox is completely empty (although there are several mails on the server).
  • After (harmless) modification of the settings of the incoming server, the inbox is synchronized once, however new mail received by the server afterwards is still not noticed.

in the mail address account settings → fetching mail: which “class” folders are in both the poll-folders and push-folders settings? any other setting weirdly limited in count (“local folder size”, advanced → “max folders to check with push”)

do you subscribe all folders, or 1st level folders or none? (sidebar bottom “manage folders”)

I’d refrain from config imports while debugging, speculating: could the import leave some config fields undefined/empty rather than on defaults?

polling really should work. Lots of users besides myself run the same version and there’d be more threads on this if there’d be some fundamental bug. In my own use I found no issue.

So I tried several approaches to solve my problem:

  • Purged storage of the Mail app; manually set up the account in the Mail app; changed no other settings in the Mail app
    • Mail app reports “success” but does not display the contents of the inbox; in fact, it displays none of the remote folders in the “hamburger” menu (just the (empty) unified inbox and the local outgoing folder) – seems to remain in this state “forever”
    • manual synchronization fetches the content of the inbox; the “hamburger” menu now lists the remote folders
    • no automatic notification on new mail, though
  • enable push for the main folder (inbox is in this class) → no change
  • disable and then re-enable (device) global synchronization settings → no change
  • reboot → no change
  • change the password of the main account of the device from the app specific password to the main Nextcloud password → no change
  • exported the settings and compared them with the settings used in the old device (with working synchronization) → nothing suspicious
  • activated debug logging in the Mail app → log is quite sparse, nothing obvious which might indicate a problem with synchronization

Shouldn’t there be a service responsible for mail synchronization in the output of adb shell ps -A – even if the Mail app is not opened? I didn’t find any process whose name contained mail, imap, or k9; neither sync in combination with something which might hint at being related to mail.

@tcecyk, you mentioned that the Mail app works well for you. I do not question that. However, there are reports of problems with synchronization, see for instance Mail app doesn't work after end of flight mode (#2361) · Issues · e / Backlog · GitLab (I just found old emails related to that bug and found that I already confirmed to being affected four years ago – then with a different device; I switched to Fairmail as the Mail app was not usable for me).

My gut feeling is that the problem might be related to the type of main account of the device. As others have noted in different threads, there is some influence of this main account on the behavior of the Mail app (like for instance overwriting / overriding the configured mail password under certain circumstances).

Kind regards
Ingolf

in the realm of gut feelings I think you’re battling your mail providers service (or at least I’d try to exclude it entirely). Sanity test with any other imap account you have for same symptoms, if missing → provider.

jitcreatives run nothing exotic, it’s dovecot/postfix as most others, but underneath things happen - either the server not being able to accommondate all tcp connections, dropping them silently, or any middleware loosing packets.

The other side of that coin would be the device network stack misbehaving, but many others have a FP4 in this forum, it would’ve come up somehow.

like for instance overwriting / overriding the configured mail password under certain circumstances

that is a different error class and fixed on 3.0.4

The mentioned case was from me, and it’s old now, the stock Mail apps from then and now are not the same anymore. When I remember well they could never really solve it, however, it was full and easy to reproduce. The problem did then somehow just not happen anymore after they made a refork of K-9. But this all is years ago and because of other problems in the original K-9 at this time I’m on Fairemail since then which has the great advantage to be the result of a completely different development and did always work very well.

I don’t really think this is a server side limitation: using IMAP push with other mail apps (like for example FairEmail) from a PC (using Thunderbird) or even with a combination of “old /e/ OS” and “old /e/ mail app” works without problems.

I agree that a general problem in the network stack seems very unlikely. But maybe some (few?) mail servers exhibit a certain property the network stack is not expecting?

As I said, I did not find a process (in the output of ps -A) hinting at being related to mail synchronization when the mail app was not active. Can you confirm that this is expected? How is mail synchronization in the background implemented then? If this is not expected: what process should I look for? Is there some means for debugging that process?

Indeed, it is old. I did not know you were the author, so you are without question qualified to determine that the two problems are not related. But at least one other person described similar problems than me recently.

Thank you all for your support!
Ingolf

ps -A … Can you confirm that this is expected? How is mail synchronization in the background implemented then?

you think it is force stopped and that is the reason? hm. I’d need to invest time to read up how k9 exactly does it, but think: polling will schedule App startups with the Android framework.

As for IMAP Idle, it keeps up a tcp socket without closing that is owned by the process id. Looks like co-routines take care of this. But you should check what

Settings → Apps → Mail and look at what “App battery usage → Allow background usage”

is set to.

uh, thanks for pointing out, a bit of a drive-by comment as the user isn’t doing airplane mode.

The user s3w3ryn comments are good. That issue creation goes back to 2021 though, around the same time that coroutines commit made its debut.

I’d still do the sanity A/B test with any other IMAP account from another provider. Just for a stronger case.

If t helps, I recognise this issue as exactly the same as my issue. Same phone, same app, same behaviour.

I reported this and received the same responses but no one was able to help.

The stock mail app worked beautifully before I sent my phone back yo base for a reflash following a complete crash.

On It’s return everything worked apart from the email app. Its not a settings thing because my settings were the same as previously and my email provider was also the same.

My email account works with Fairemail and with delta chat on the phone and will all Linux mail apps on my P.C. but there is no collection of new mail at all with the stock emailer unless a manual refresh is done.

I have given up on getting any help now and moved to Fairemail.

It was hard to accept that we couldn’t get to the bottom of this but I understand that support resources are limited in Murena :person_shrugging:

On a plus bite, Fairemail is a cracking app :grin:

If there were to be an effort to resolve this in the future I wijmd be more than happy to provide assistance with diagnostics. I set up my accountable in the email app just before responding to this and nothing has changed at all, still ko new mail being collected.

James

what’s the provider of your mail account though? this seems to be a major aspect in this thread

I could be forgiven for thinking that this is irrelevant given that the entire system worked beautifully before the phone was re-flashed at Murena H.Q. early in the year. The same version of the O.S. was used as well as the same version of the email app and the same email provider.
I have my own domain which I host at https://krystal.io
They are quite responsive to questions though so if there is something you wish to know about their servers I would be happy to ask them?
The other thing that takes the blame away from my server however is the fact that ALL other mail applications work as expected with my account and my e.email murena address also fails with the stock app which you wouldn’t expect given it is hosted by the operating system’s developers!

Just some thoughts and, again, I am more than happy to get involved and do what I can to assist in diagnosing this problem.

Thanks for the reply.

James

Hi,

do you, by chance, refer to your IMAP server by a name which is a CNAMEDNS record rather than an A record? In the past, I got the impression that this might have some impact on the behavior of the eOS mail app.

Using some DNS tools (shell or web based), please issue a query, for instance dig imap.your.domain.name. Do you get a response like the following?

imap.your.domain.name.        4829    IN      CNAME   some.host.by.your.provider.

And another question: Did you check whether you encounter similar problems when using the K-9 / Thunderbird app (for instance from the F-Droid repository)?

Kind regards
Ingolf

Hello ingolf,
Delighted to hear from you again. On the first point I have this:

james@Kubasus:~$ dig imap.bronyaur.scot

; <<>> DiG 9.18.39-0ubuntu0.24.04.2-Ubuntu <<>> imap.bronyaur.scot
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 40229
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;imap.bronyaur.scot. IN A

;; AUTHORITY SECTION:
bronyaur.scot. 1376 IN SOA ns1.krystal.uk.
admin.k-validator-brunor.krystal.uk. 2025092500 3600 1800 1209600
86400

;; Query time: 231 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Mon Oct 27 20:46:32 GMT 2025
;; MSG SIZE rcvd: 122

And on your second point, I installed K-9 and set it up for my account
and it doesn’t work. I sent a test mail which appeared almost
instantly in FairEmail and on my P.C. but never did appear in K-9.
I opened up K-9 and had a look at the settings and, while I had the app
open, and some 15 minutes later, the mail did appear. So, I tried the
experiment again and, this time, didn’t touch the app and, well I’m
still waiting so that’s not good enough really.
So, does any of this help?
It is odd that neither the stock app not K-9 can receive push mail nor,
apparently, do they poll out for mail however both of them can manually
receive mail. My unbderstanding is that the stock mailer is a fork of
K-9 so this might be telling!

Thanks for your continued interest.

James

This looks suspicious. Are you sure that the name of your IMAP server is correct?

K-9 and stock mail (mis)behaving in the same way is identical to what I experienced myself.

Kind regards
Ingolf

This topic was automatically closed after 90 days. New replies are no longer allowed.