IMAP IDLE Support - Questions and how to help

56 views
Skip to first unread message

Oliver Freyermuth

unread,
Nov 27, 2019, 12:17:33 PM11/27/19
to K-9 Mail
Hi together,

since I was adviced in https://github.com/k9mail/k-9/issues/4258 to redirect my questions to the mailing list, I'm hereby doing this.

1. How is Google Push related to IMAP IDLE?

2. Is help by users (testing on devices, checking why IMAP IDLE worked before it was forcefully disabled) something that can help the devs, or are the existing issues fully understood and no input is needed?

3. What's the opinion on being able to toggle IMAP IDLE for those users for whom it worked (very well) in the past, instead of having it disabled in a hardcoded manner?

What I can offer:
- Basic Java knowledge, Linux / Logcat analysis knowledge, IMAP protocol knowledge, networking experience.
- Testing on Android 10 on a OnePlus 6 device (where IMAP IDLE was working fine before).

Cheers and hope this helps,
Oliver

Greg Troxel

unread,
Nov 27, 2019, 2:33:01 PM11/27/19
to 'Oliver Freyermuth' via K-9 Mail
"'Oliver Freyermuth' via K-9 Mail" <k-9-...@googlegroups.com> writes:

> since I was adviced in https://github.com/k9mail/k-9/issues/4258 to
> redirect my questions to the mailing list, I'm hereby doing this.

I'll address only one point.

> 1. How is Google Push related to IMAP IDLE?

First, "google push" is not a term I often see. I assume you mean
"using GCM messages, now called FCM, to cause an app to begin
processing", with the usual scheme being that somehow a FCM message is
sent from a server via the FCM cloud and to the phone, which causes it
to do something like check in with the server.

First, this solution is problematic from a privacy perspective (and
requires agreeing to some Google TOS), and relies on having google code
in the phone. It is, for example, not present in LineageOS.

I am not aware of any use of FCM in k-9. (Perhaps that's because I use
the f-droid build, where any FCM code would have to be removed in order
to produce a Free Software apk. But my I have also not seen any
discussion of it.)

I am not aware of IETF standards that describe how to integrate IMAP and
these sorts of push notification services. There is a generic http
push RFC:

https://tools.ietf.org/html/rfc8030

and some more or less expired content:

https://tools.ietf.org/html/rfc4550
https://datatracker.ietf.org/doc/draft-maes-lemonade-p-imap/

but I am not aware of this being in use in a general/interoperable
manner. (It would not surprise me that various proprietary mail
services with proprietary companion apps do things like this.)

So I will advance the theory that:

k-9 does not use FCM/GCM (and hence does not use "google push")

IMAP IDLE is the standard approach

discussion of "google push"/FCM in this context is without basis and
basically a red herring

I would be interested to hear any explanations if that's not accurate.

Oliver Freyermuth

unread,
Nov 27, 2019, 2:52:56 PM11/27/19
to k-9-...@googlegroups.com, Greg Troxel
Am 27.11.19 um 20:32 schrieb Greg Troxel:
> "'Oliver Freyermuth' via K-9 Mail" <k-9-...@googlegroups.com> writes:
>
>> since I was adviced in https://github.com/k9mail/k-9/issues/4258 to
>> redirect my questions to the mailing list, I'm hereby doing this.
>
> I'll address only one point.
>
>> 1. How is Google Push related to IMAP IDLE?
>
<snip>
>
> So I will advance the theory that:
>
> k-9 does not use FCM/GCM (and hence does not use "google push")
>
> IMAP IDLE is the standard approach
>
> discussion of "google push"/FCM in this context is without basis and
> basically a red herring
>
> I would be interested to hear any explanations if that's not accurate.
>

I could not agree more with all your statements.

My question was motivated due to comments by @beerisgood in https://github.com/k9mail/k-9/issues/4258 (marked as off-topic),
explaining that push in K9 mail works fine on stock ROMs with Gapps since "Google Push" is used.
I failed to understand how these things relate, since my understanding of K9 mail push always was "IMAP IDLE",
and Google Push (to my understanding) is GCM indeed, as you stated.

Quoting myself from that issue:
"Is it because Google push enforces that the device keeps up a persistent TCP connection,
which - coincidentally - also IMAP IDLE requires, such that the built-in Google stuff "by accident" fixes IMAP IDLE by forcing the TCP stack to stay active?"

This would be the only correlation I could think of. However, a clear statement that K9 does indeed _not_ use GCM from the devs would be nice.

Indeed, "push" notifications in K9 mail were always working very well for me, but my device is running a stock ROM with Gapps.
But apparently it was broken for most users (otherwise it would not have been removed without any possibility for the user to re-enable it),
according to the comments marked as off-topic, it seems this was mainly the case on non-Gapps devices.

Cheers and thanks,
Oliver

Andy Figueroa

unread,
Nov 27, 2019, 4:57:52 PM11/27/19
to k-9-...@googlegroups.com
Contact a developer. You're wasting your time here.
--
Andy

-- 
You received this message because you are subscribed to the Google Groups "K-9 Mail" group.
To unsubscribe from this group and stop receiving emails from it, send an email to k-9-mail+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/k-9-mail/64bb659e-bf73-8781-0701-896f09b77516%40googlemail.com.

Oliver Freyermuth

unread,
Nov 27, 2019, 5:03:08 PM11/27/19
to k-9-...@googlegroups.com, Andy Figueroa

Am 27.11.19 um 22:57 schrieb Andy Figueroa:
> Contact a developer. You're wasting your time here.

Thanks for the clarity.
Which communication channel should I use then? Apparently, this discussion is unwanted on the issue tracker where devs are roaming,
as a dev there directed me to this mailing list for these kinds of questions.

Thanks and all the best,
Oliver
> To unsubscribe from this group and stop receiving emails from it, send an email to k-9-mail+u...@googlegroups.com <mailto:k-9-mail+u...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/k-9-mail/A1337045-6681-4714-A106-90A5D9D2111D%40gmail.com <https://groups.google.com/d/msgid/k-9-mail/A1337045-6681-4714-A106-90A5D9D2111D%40gmail.com?utm_medium=email&utm_source=footer>.

Bjoern Franke

unread,
Nov 28, 2019, 5:51:08 AM11/28/19
to k-9-...@googlegroups.com
Am 27. November 2019 23:03:11 schrieb "'Oliver Freyermuth' via K-9 Mail"
<k-9-...@googlegroups.com>:
> https://groups.google.com/d/msgid/k-9-mail/3964d39f-0e30-8b48-638d-df7ff4c5aa9d%40googlemail.com.

I remember that issue existed for a long time and users wondered how other
mail apps, e.g. Aqua Mail, handles this issue

Regards
Björn


cketti

unread,
Dec 1, 2019, 6:38:33 PM12/1/19
to k-9-...@googlegroups.com
On 27.11.19 20:52, 'Oliver Freyermuth' via K-9 Mail wrote:
> However, a clear statement that K9 does indeed _not_ use GCM from the devs would be nice.

K-9 Mail doesn't use GCM/FCM or any other generic Push mechanism.

IMAP IDLE works by opening a direct connection to the mail server and
listening for changes "pushed" by the server.

Power saving related changes in Android made it harder to write an
IDLE-capable client. Those changes in Android were made to get users a
better battery life. I'm sure the required changes to the app will make
K-9 Mail better in the end. But for now it's work that needs to be done
in order to get things to the same functional level as before.


Reply all
Reply to author
Forward
0 new messages