Skip to content
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 IMAP capabilities instead of overwriting them #413

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

link2xt
Copy link
Contributor

@link2xt link2xt commented Sep 22, 2024

I wanted to add COMPRESS=DEFLATE,
but it should be added only for sessions
that are logged in because COMPRESS
command does not work before logging in.

Dovecot already does it correctly
if we don't overwrite the capability string.

@link2xt link2xt requested review from hpk42 and missytake September 22, 2024 16:09
I wanted to add `COMPRESS=DEFLATE`,
but it should be added only for sessions
that are logged in because `COMPRESS`
command does not work before logging in.

Dovecot already does it correctly
if we don't overwrite the capability string.
@link2xt link2xt force-pushed the link2xt/append-capabilities branch from 6787293 to b71339b Compare September 22, 2024 16:10
@link2xt
Copy link
Contributor Author

link2xt commented Sep 22, 2024

This is how IMAP session looks like with this change, I don't think this is a significant network overhead compared to TLS hello messages and actual mails:

* OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE XDELTAPUSH XCHATMAIL LITERAL+ AUTH=PLAIN] Dovecot (Debian) ready.
? LOGIN [email protected] ...
? OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY PREVIEW STATUS=SIZE SAVEDATE XDELTAPUSH XCHATMAIL LITERAL+ NOTIFY METADATA SPECIAL-USE COMPRESS=DEFLATE QUOTA] Logged in

@link2xt
Copy link
Contributor Author

link2xt commented Sep 22, 2024

This also enables ID capability which Delta Chat uses to display server ID in connectivity view when it is available.

@hpk42
Copy link
Contributor

hpk42 commented Sep 23, 2024 via email

@link2xt
Copy link
Contributor Author

link2xt commented Sep 23, 2024

The other option is adding COMPRESS=DEFLATE to the list, but this is incorrect because COMPRESS is not actually available before login.

@hpk42
Copy link
Contributor

hpk42 commented Oct 11, 2024

the overhead seems to be roughly 350 bytes -- it's not super-huge i agree, but also i don't see the point of adding ~300 bytes unneccessarily for each imap connection.

@hpk42 hpk42 merged commit d0ed883 into main Oct 13, 2024
6 checks passed
@hpk42 hpk42 deleted the link2xt/append-capabilities branch October 13, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants