cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MuxyDuGoulp
New member
Status: New idea

Description: Currently, SmtpTransport in K-9/Thunderbird issues an initial EHLO during connection setup (and another after STARTTLS), but does not re-issue EHLO after a successful SASL authentication step (such as AUTH PLAIN, AUTH LOGIN, or OAuth).

The Problem:

  1. Stale Capabilities & Size Limits: Many SMTP servers (like Exim or Postfix) dynamically adjust their offered extensions or message size limits (SIZE) based on whether the client is authenticated or depending on the specific user account privileges. Because K-9 caches the capabilities from the pre-authentication EHLO, it remains unaware of post-auth limits (e.g., largestAcceptableMessage remains stuck on the anonymous/unauthenticated tier limit).

  2. Client-side Blocking: If the initial pre-auth EHLO advertised a small size limit, the client blocks large outgoing messages locally before even trying to send them, or fails to negotiate proper limits for the authenticated session.

Proposed Solution: Re-issue sendHello(SMTP_HELLO_NAME) right after a successful authentication block (when authType != AuthType.NONE), and refresh the optional size value parsing, similarly to how it's already handled after STARTTLS:

if (authType != AuthType.NONE) {
    extensions = sendHello(SMTP_HELLO_NAME)
}
parseOptionalSizeValue(extensions["SIZE"])

I'd be happy to open a Pull Request with this change if this approach aligns with the project's design.