So I did not do the terminal commands yet. I will try that next but I need a little more info for that. But I did do the debug thing in K9mail. I did a search for “capability” and it was not in the ext file log at all. So probably not good. I’m a security type person so it is likely to end up being some setting that I have disabled but I have to figure out which one. I probably need to know what default settings in android are assumed to be enabled prior to trying to enable push in K9.
That said, I would like to rule out my email server as the culprit first. My email server is “mail.mydomain.com” and I use IMAP and port 993 of course, so how would I test that? I am on linux here so would I open a terminal window and run that command?
If K9’s debug log is easier for you, try manually sync’ing your account while logging is enabled.
Then export the log and search for the capability string.
Your result confirms the server supports IDLE (Push) so you need to look for a different cause.
Can you enable push while debug logging is enabled and review the log afterwards.
You should see the Push service startup (like below) or failure in the log.
08-20 23:50:31.966 10979 14381 V PushController: PushController.updatePushers()
08-20 23:50:31.970 10979 14381 V PushController: ..Starting PushController for accounts: [c845b3c8-759b-4243-8e56-0568f12674e8]
08-20 23:50:31.970 10979 14381 V AccountPushController: Starting push controller for account c845b3c8-759b-4243-8e56-0568f12674e8
08-20 23:50:31.973 10979 14381 V PushController: ..Running PushControllers: [c845b3c8-759b-4243-8e56-0568f12674e8]
08-20 23:50:31.974 10979 14381 V PushServiceManager: PushServiceManager.start()
08-20 23:50:31.979 10979 11052 V ImapBackendPusher: ImapBackendPusher.updateFolders(): []
08-20 23:50:31.979 10979 14716 V AccountPushController: Updating push folders for account c845b3c8-759b-4243-8e56-0568f12674e8: [INBOX]
08-20 23:50:31.980 10979 14716 V ImapBackendPusher: ImapBackendPusher.updateFolders(): [INBOX]
08-20 23:50:31.981 10979 14716 V ImapFolderPusher: Starting ImapFolderPusher for GMail / INBOX
08-20 23:50:31.984 10979 14381 V BootCompleteManager: Enable BootCompleteReceiver
08-20 23:50:31.987 10979 14901 V ImapFolderPusher: Starting ImapFolderPusher thread for GMail / INBOX
08-20 23:50:31.987 10979 14901 V AndroidPowerManager$AndroidWakeLock: AndroidWakeLock for tag ImapFolderPusher-GMail-INBOX / id 4: Create
08-20 23:50:31.989 10979 10979 V PushService: PushService.onCreate()
08-20 23:50:31.990 10979 10979 V PushService: PushService.onStartCommand(Intent { xflg=0x4 cmp=net.thunderbird.android.beta/com.fsck.k9.controller.push.PushService mCallingUid=10377 })
08-20 23:50:31.992 10979 14381 V AutoSyncManager: Registering auto sync listener
08-20 23:50:31.993 10979 14901 V AndroidPowerManager$AndroidWakeLock: AndroidWakeLock for tag ImapFolderPusher-GMail-INBOX / id 4: acquired with no timeout.
08-20 23:50:31.994 10979 11049 I MessagingController: Running command 'synchronizeMailbox', seq = 86 (background priority)
08-20 23:50:31.995 10979 10979 V PushServiceManager: PushServiceManager.setServiceStarted()
Do you have any phone settings or other applications installed that could be blocking the push service from starting?
I may be useful to check if the apps synchronisation(Push) notification category is disabled. It’s normally enabled but set as silent.
OK I finally had a chance to check this. I did the debug log thing and the following is the output except that any numbers that look like they could have been account numbers or something I replaced with XXX’s. But I think the last line doesn’t look good. One other thing, I have 3 email accounts on this K9 install but only one of them I enabled PUSH by clicking the slider for the inbox folder as described in that web link.
08-23 18:48:33.934 17123 17155 V Sink$-CC: PushController.initInBackground()
08-23 18:48:33.934 17123 17155 V Sink$-CC: PushController.updatePushers()
08-23 18:48:33.936 17123 17157 D WM-Processor: Processor cancelling xxx
08-23 18:48:33.936 17123 17157 D WM-Processor: WorkerWrapper could not be found for xxx
08-23 18:48:33.936 17123 17123 D CompatChangeReporter: Compat change id reported: xxx; UID xxx; state: ENABLED
08-23 18:48:33.938 17123 17155 V Sink$-CC: ..Running PushControllers: []
08-23 18:48:33.938 17123 17155 V Sink$-CC: PushServiceManager.stop()
08-23 18:48:33.938 17123 17155 V Sink$-CC: ..PushService is not running
08-23 18:48:33.938 17123 17155 V Sink$-CC: Disable BootCompleteReceiver
08-23 18:48:33.939 17123 17157 D WM-GreedyScheduler: Cancelling work ID xxxx
08-23 18:48:33.939 17123 17155 V Sink$-CC: PushController.updatePushers()
08-23 18:48:33.942 17123 17155 V Sink$-CC: ..Running PushControllers: []
08-23 18:48:33.943 17123 17155 V Sink$-CC: PushServiceManager.stop()
08-23 18:48:33.943 17123 17155 V Sink$-CC: ..PushService is not running
08-23 18:48:33.943 17123 17158 D WM-SystemJobScheduler: Scheduling work ID txxx ID xxx
08-23 18:48:33.943 17123 17155 V Sink$-CC: Disable BootCompleteReceiver
08-23 18:48:33.947 17123 17155 V Sink$-CC: PushController.updatePushers()
08-23 18:48:33.951 17123 17155 V Sink$-CC: ..Running PushControllers: []
08-23 18:48:33.951 17123 17155 V Sink$-CC: PushServiceManager.stop()
08-23 18:48:33.951 17123 17158 D WM-GreedyScheduler: Starting tracking for xxx
08-23 18:48:33.952 17123 17155 V Sink$-CC: ..PushService is not running
08-23 18:48:33.954 17123 17155 V Sink$-CC: Disable BootCompleteReceiver
08-23 18:48:33.954 17123 17156 D WM-ConstraintTracker: BatteryNotLowTracker: initial state = true
08-23 18:48:33.954 17123 17156 D WM-BrdcstRcvrCnstrntTrc: BatteryNotLowTracker: registering receiver
08-23 18:48:33.955 17123 17155 V Sink$-CC: PushController.updatePushers()
08-23 18:48:33.955 17123 17123 I ActivityThread: Schedule relaunch activity: net.thunderbird.app.common.MainActivity callers=android.app.Activity.recreate:7433 androidx.core.app.ActivityCompat.recreate:7 androidx.appcompat.app.AppCompatDelegateImpl.applyApplicationSpecificConfig:227 kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend:591 kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invoke:196
08-23 18:48:33.957 17123 17156 D WM-WorkConstraintsTrack: NetworkRequestConstraintController register shared callback
08-23 18:48:33.957 17123 17155 V Sink$-CC: ..Running PushControllers: []
08-23 18:48:33.957 17123 17155 V Sink$-CC: PushServiceManager.stop()
08-23 18:48:33.957 17123 17155 V Sink$-CC: ..PushService is not running
08-23 18:48:33.957 17123 17155 V Sink$-CC: Disable BootCompleteReceiver
08-23 18:48:33.958 17123 17155 V Sink$-CC: PushController.updatePushers()
08-23 18:48:33.961 17123 17156 D WM-PackageManagerHelper: Skipping component enablement for androidx.work.impl.background.systemalarm.RescheduleReceiver
08-23 18:48:33.962 17123 17155 V Sink$-CC: ..Running PushControllers: []
08-23 18:48:33.962 17123 17155 V Sink$-CC: PushServiceManager.stop()
08-23 18:48:33.964 17123 17123 D WM-SystemJobService: onStartJob for WorkGenerationalId(workSpecId=cxxxxx, generation=0)
08-23 18:48:33.965 17123 17155 V Sink$-CC: ..PushService is not running
Check you’ve granted the app permission to run in the background and exempted it from any battery optimisations. I’m doubtful this will resolve the problem though. You should immediately be seeing the Android Push notification after turning the service ON for a folder. You indicate you don’t.
I suspect the service is not able to start. I would expect so see an entry similar to the one below but it’s missing from your log. Is there any chance you posted the events when turning OFF push rather than turning it ON.
PushController: ..Starting PushController for accounts:
Q1) Have you tried enabling push on any other Imap account such as Gmail. Doing so would help confirm if the issue is device specific or email account specific.
Q2) Do you have any other device you can test with using the same email account.
I don’t know if it matters but I have the following settings…
Phone settings…
->accounts->Automatically sync app data _> OFF
also
in K9-Mail…
->settings->general settings->network->Background sync->never
“Check you’ve granted the app permission to run in the background and exempted it from any battery optimisations.”
Yes, I have done this.
“I’m doubtful this will resolve the problem though. You should immediately be seeing the Android Push notification after turning the service ON for a folder. You indicate you don’t.”
Yes, I don’t see any indication that it is turning on.
“Is there any chance you posted the events when turning OFF push rather than turning it ON.”
I don’t think so. It is just a slider for push and I am sliding it to the right as it is by default in the off position to the left. Then I back out of settings.
Q1) Have you tried enabling push on any other Imap account such as Gmail. Doing so would help confirm if the issue is device specific or email account specific.
Yes, I have 3 accounts on this phone (all on my domains that I own but they are on different accounts) and I tried it on all three and it does nothing. PUSH just seems to not start.
Q2) Do you have any other device you can test with using the same email account.
Unfortunately no. I have only 1 android phone.
I have to think that there is some setting or service or something that I have disabled because I’m a “security” minded (read nut) person. I do have NextDNS although I can’t see that doing anything. And I have NetGuard firewall but I have allowed everything and K9 goes through it fine.
Yes, my apologies. What I meant was that those 2 settings (one in K( and the other in the general phone settings) I usually have set that way. But when trying to enable PUSH I did set them both actually to enabled, but no effect. The one in K9 actually has three options and I usually have it set to never but I tried both other settings and no effect. Still dead.
Is there possibly an unrelated service that I might have disabled thinking it was, well, unrelated?
I’d suggest installing a clean copy of Thunderbird for Android along side your existing copy of K-9. Add a single Imap account manually. Leave all settings on their defaults and see if the Push service and it’s notification is displayed.
At this point we can only guess what you may have disabled in the app or at the Android level.
Yeah, at this point I feel if I really want this thing to work I might need to do a factory reset of my phone and start with K9 as the first app I install and see if it works. I hate doing that but I think that’s the only way to know what’s going on. Thank you for your help.
Wow, so I did as you said first before doing a factory reset and it worked. I uninstalled K9 completely and got rid of everything. Then I did a clean install and it worked fine. No problems and push works! I guess I upgraded for so many years using the same config file and it just became cluttered with something that was conflicting. Starting fresh fixed things right up.
I’ve been through what appears to be the same problem. One data point is that my email server went through a migration to a different host. (I run my own email server.) I’ve done it twice in the past two weeks. A re-install of K9 was required the first time, and I’m about to reinstall K9 again.