Dovecot Push Notifications for iPhones

SYSTEM INFORMATION
OS type and version Rocky Linux 8.10
Usermin version 2.102
Virtualmin version 7.20.2
Theme version 21.20.7
Apache version 2.4.37
Package updates All installed packages are up to date

I’m looking for guidance on a best method for getting push notifications working for Dovecot email. One that is friendly for Virtualmin. I’ve recently had a couple of complaints about this not working.

Thanks!

Push notifications are generated by the mobile app, in this case, presumably, the Apple Mail App, which supports the IMAP protocol and should therefore show notifications on the iPhone regardless of the IMAP server that is being used, be it Dovecot or any other.

Dovecot has nothing to do with push notifications per se.

Edit: I was wrong about that. See Push Notification Framework — Dovecot documentation

Regardless of the above, push notifications should display whenever the app polls the server. If your users are complaining about notifications not being received on their mobile devices, the cause is likely a permissions issue between the app and iOS.

Thanks calport.

Working with one end user, he says it works when he is either charging or on WiFi, but does not work when on mobile service. Apple says it doesn’t work with some mail servers. Then I read on the Dovecot docs that LDAP seemed to be the solution. So, mostly I’m wondering what is most friendly to Virtualmin so as not to create a monster (something that has to be hand configured for each user).

I will be able to put my hands on an iPhone tonight to see if the users are simply missing a step or if in fact it does need a push from the Dovecot server. Apple docs show it to be sometimes a multi-step permission process.

The user is of course seeing the email when he opens the app, no matter what the situation is. He is only having the issue when on the mobile network.

I have never had this question before until just recently. I’m wondering if Apple is trying to save battery life or something.

Of interest, neither Apple Mail nor Outlook on his iPhone will show notifications on mobile networks.

Edit:
And I should have said LMTP instead of LDAP. Yup, I’m really a green noob on this.

Dovecot handles push notifications as it is the IMAP server. This feature is enabled by default.

The key thing is that the mobile app supports IMAP push notifications. I use K9 for my android phone.

I have this working with no configuration required on dovecot.

Don’t overthink. This is a layer 8 issue.

On their iOS device, let them visit Settings > Mail > Mail Accounts > Fetch New Data (this is iOS 18).

Here, they’ll have to activate “Push” as well as “Fetch” with any option (“Hourly” should be fine) other than “Automatically” which only fetches while on power and Wi-Fi.

All I read you need a extra plugin, IMAP needs the client to sync, it doesn’t push to the clients device.

I asked the most reliable Copilot (haha) I know its frond open in here, but anyway this is the response.

Dovecot itself doesn’t directly handle push notifications for iOS devices like APNs does. However, Dovecot can be configured to work with push notifications through additional plugins and configurations.

To enable push notifications in Dovecot, you need to use the notify and push_notification plugins. These plugins can be configured to send notifications to external services that can then handle the delivery to iOS devices12.

For example, you can use the ox driver to send notifications to an endpoint that supports the Open-Xchange App Suite Push Notification API1. Additionally, there are community solutions like dovecot-push_notify that provide support for Apple Mail push notifications3.

Nope :slight_smile: , I made this mistake. The extra plugin and configuration is for PUSH notifications to a browser. I have instant email notifications on my my phone from my Virtualmin server.

My Research

  • Push Notification Framework — Dovecot documentation
    • Dovecot’s Push Notification framework exposes RFC 5423 (Internet Message Store Events) events that occur in Dovecot to a system that can be used to report these events to external services.
  • config file = /etc/dovecot/conf.d/20-imap.conf
    • #mail_plugins = $mail_plugins → mail_plugins = $mail_plugins notify push_notification
  • All Settings | Dovecot CE
  • IMAP | Dovecot CE
  • = already part of the core
  • = nothing to do, just enable it on your phone

My 20-imap.conf doesn’t have that enabled, its not default.
These links don’t work
image

As I don’t have a problem with this (it just works) i did see this Push Notification Framework — Dovecot documentation
you seem to have to enable it with the following line

mail_plugins = $mail_plugins notify push_notification

in the protocol lmtp section, my setup does not have this but I still get notifications on both android & apple devices

updated the links, they must of recently changed their URLthings

I will need to check my logs to see if it a imap login that does the notification.

As I thought, I only get notified once the phone logs in. Not a push.

So, apparently I did make a bad assumption. You do not need Push on Dovecot for notifications to work on iPhones. However, the iPhone has a bunch of settings in various places which can prevent it from working. So, this is a software/settings issue on iPhones, not something that has changed causing a need to change Dovecot.

Thanks so much for all the replies and information. I was certainly about to waste a lot of time.

1 Like

I don’t see how they could be related. Can you point me to where you saw that in the docs?

I corrected myself up above. I should have said lmtp instead of ldap. As seen on
https://doc.dovecot.org/2.3/configuration_manual/push_notification/
under usage near the top.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.