-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add ID command for IMAP #6846
Add ID command for IMAP #6846
Conversation
While this PR is functional now, I have some uncertain points about it.
|
Properties in
Same as 2). Different mechanism.
A handful of providers seem to require the ID command. So it should probably be enabled by default.
Tests should go into
Without further context I'd assume this is a method name, because it starts with a verb. I suggest changing it to
The name of the app ("K-9 Mail") should be supplied via a BuildConfig field. See e.g. https://github.com/thundernest/k-9/blob/975049ef71e06d4f598b2838f58cbc3fe63a1f77/app/k9mail/build.gradle.kts#L89-L93 Instead of adding a Bool and a String to |
Sorry. I'm not clear about the code for them. Do you mean add a single I guess we can add a checkbox in the AccountSetupIncoming.java. If it's checked, write the text from corresponding BuildConfig field to the setting item
IDK if the logic above is appropriate. |
Yes.
They don't. The app will set the value to its app name (read from a BuildConfig field) if the setting to send the client ID is enabled and to |
So I guess the logic I said above is fine? If so I'll write code based on this.
|
By the way, I wonder why not adding a |
I will squash my commits when things are ready. |
The IMAP code is in a library project that knows nothing about the app using the library. It's also a JVM-only project, that doesn't have access to |
I see. |
Apologies for not being clear enough. The code to translate |
OK. I will refactor my code tomorrow because it's late night(UTC+8). |
If the code is good I'll implement the unit test. |
app/k9mail/src/main/java/com/fsck/k9/backends/ImapBackendFactory.kt
Outdated
Show resolved
Hide resolved
mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapConnection.kt
Outdated
Show resolved
Hide resolved
mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapSettings.kt
Outdated
Show resolved
Hide resolved
mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapStoreConfig.kt
Outdated
Show resolved
Hide resolved
mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapConnection.kt
Outdated
Show resolved
Hide resolved
Thank you for spending time reviewing this. I have changed the code as you suggested and tested in on my device. It works as 2096b97 |
Sorry, I don't know what's the server response look like if the ID capability is present. Could you please implement the tests? |
Thanks 👍 |
Thank you so much for guiding me and reviewing this! |
Fixes #5089
This PR is based on the implementation of
useCompression
and PR #5578.I have tested this PR on Netease mail, which requires the ID extension. It works as expected.