-
Notifications
You must be signed in to change notification settings - Fork 309
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
feature: don't request CAPABILITY after auth/login if they are returned in auth response #561
Comments
This is v2 right? v2 already tries to avoid requesting Which specific commands are you using that trigger the |
This is v2. I think capabilities in response are parsed and then invalideted in the next line from server (when auth/login command ends )
Here is what i was doing on login , later i call Caps to deside on options for List call
|
You need to |
oh sorry this was a tls conn so starttls branch should not be here updated flow is just create client , waitgreeting, check logindisabled (this code is common for tls and plain conn ) , login LOGINDISABLED capability check is what initiated T1 capability command
next list calls Caps
I can write a complite example that reproduces the problem later ( gmail returns capabilities in login for example ) |
Ah, OK, so the problem is not the The problem is that the capabilities are sent in a response separate from the Section 7.2.2 says:
However GMail doesn't comply with this. |
so they mean server should send CAPABILITY response code in LOGIN response ?
seems wrong |
Like this:
|
I found an example of this
Ok this seems like what they mean by this |
Section 7.1 describes these. |
This is typical for Dovecot IMAP, which is one of the most used IMAP servers. |
imapclients invalidates capabilities on login/auth/starttls as it should but login and auth often send capabilities in response, those can be used but they are cleaned too.
From rfc - https://datatracker.ietf.org/doc/rfc9051/
Here is debug log that demonstrates the problem (with creds removed) - T3 request can be avoided
T1 CAPABILITY\r\n* CAPABILITY IMAP4rev1 CHILDREN UNSELECT LITERAL+ NAMESPACE XLIST UIDPLUS ENABLE ID AUTH=PLAIN AUTH=XOAUTH2 IDLE MOVE\r\nT1 OK CAPABILITY Completed.\r\nT2 LOGIN "[email protected]" "password"\r\n* CAPABILITY IMAP4rev1 CHILDREN UNSELECT LITERAL+ NAMESPACE XLIST UIDPLUS ENABLE ID IDLE MOVE\r\nT2 OK LOGIN Completed.\r\nT3 CAPABILITY\r\n* CAPABILITY IMAP4rev1 CHILDREN UNSELECT LITERAL+ NAMESPACE XLIST UIDPLUS ENABLE ID IDLE MOVE\r\nT3 OK CAPABILITY Completed.
The text was updated successfully, but these errors were encountered: