-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending notifications does not trigger mail check #25
Comments
Some more things to look at:
|
No code changes. So here is an interesting one: I am only getting notifications from my Dovecot server if I add my (non-working) OS X Server (5.1.7) to my accounts on my iOS devices. The server is not configured with any sensible domain or anything. Did Apple lock down email push notifications to OS X Server? |
Server capabilities. Not sure if this matters though. OS X Server 5.1.4:
Dovecot 2.0.19 with dovecot-xaps-plugin:
|
Looking at this with interest as I run Dovecot on Linux with iOS push, but using a different implementation. That's still working for me for what it's worth. Did you renew the cert and then it stopped working? Or did it stop working and you tried to renew as a troubleshooting step? Are you sure you're using the mail cert as opposed to one of the various other push certs that macOS Server grabs for itself? Using the wrong cert might cause the behaviour you've described. |
Have you already made some progress in this case? I'm running your code with dovecot 2.2, new mails are pushed, but if I've read them on another device, this status won't be pushed but only updated after 15 minutes pull interval. But maybe this behaviour is by design. Fastmail did archive a push of all states with cyrus, but as far as I know they've been supported by Apple. |
@zero-one-devteam – that sounds like a different issue, and the behaviour is more or less by design. Apple's IMAP push implementation is best thought of as a commanded fetch. Whenever the device receives a push notification for the account, it updates its view of the INBOX and alerts on new mail as required. If you're using a mail delivery plugin to generate push events, you'll only get them when new mail arrives. Other events that might affect the badge count, like reading mail on another device, don't result in new mail delivery and so don't generate a push event. If you generate push events on all relevant INBOX changes, you'll get a more immediate view of the mailbox across multiple devices. There's potentially a battery life tradeoff there, as reading activity on one device will then cause fetches on others. That's probably what Fastmail are doing. |
Thanks for pointing that out. We would like to got for Fastmail's approach, because waiting 15 minutes to sync makes some confusion. Maybe we can use the notify plugin as a wrapper around it, what do you think? |
That's more or less this issue if you want to discuss it further: st3fan/dovecot-xaps-plugin#5 |
Hi guys, any progress with this issue? Can I help somehow with the debugging? |
@matthewpowell What other implementation are you using? |
@rlaager It's a private implementation (at least until now), based fairly closely on Apple's macOS Server work. As a result, documentation is sparse to nonexistent, but you're welcome to take a look: https://github.com/matthewpowell/pushnotify |
Interesting thread. I've been using @st3fan implementation of email push notifications for Dovecot since at least one year and a half and never had the issue reported here. And as of today it is still working pretty well :) Any update @st3fan, were you able to understand what was wrong on your side ? |
I ran into this a couple of weeks ago. I got it working by disabling push on the client and enable it a couple of minutes later.
|
Let's think about this case: I have so much time and money, that I have more than 1 OS X Server with dovecot installed and I want to use my device with both of them. Since iOS supports multiple mail accounts, this is a valid scenario. How does iOS decide which INBOX to check when an APN comes in? It's just guessing, but the only thing we send back to the iOS device is the topic which identifies the OSX Server. |
I'm not sure what is going on but sending notifications does not trigger mail check anymore.
Here is my debug log:
I've renewed by certificates by installing OS X Server on top of OS X 10.11. I enabled the mail server and push notifications. Exported the p12 and extracted the cert and key from it,
My client devices are a mix of iOS 10.0.1 and 9.3.2. Settings look good, notifications enabled. Visible on lock screen, etc.
The
xaps-daemon
connects to Apple's APNS service without complaints. I was worried that maybe the Entrust certificate was missing but that does not seem to make a difference. I even added a call toconn.ValidateHostname()
to the code to make sure the Go TLS library is happy about the connection. It is.I added a bunch more debug output and I see the
xapsd
server send notifications. They have the right format, they go to the APNS service. Does not trigger mail check though.I added a feedback channel and check more explicitly for errors returned by Apple's APNS service. Nothing.
As another experiment I put together a minimal push client that uses https://github.com/sideshow/apns2 and just notifies my three iOS devices (2 on 10.0.1 and 1 on 9.3.2). Nothing happens.
... more later ...
The text was updated successfully, but these errors were encountered: