Describe the bug
Every IMAP/SMTP reconnect performs a full TLS handshake. There's no tls.Config.ClientSessionCache configured, so server-issued session tickets are dropped. Reconnect cost on slow networks (or post-IDLE-timeout) is multiple seconds when it could be a single round-trip.
Expected behavior
Configure a tls.LRUClientSessionCache per account (or shared). Verify session resumption is happening with a debug log.
Why it's hard
Both IMAP (via connectWithOptions) and SMTP (tls.Dial) bypass the cache today. The fix is small but has to be applied in three places consistently and the cache lifetime must be tied to account credentials.
Describe the bug
Every IMAP/SMTP reconnect performs a full TLS handshake. There's no
tls.Config.ClientSessionCacheconfigured, so server-issued session tickets are dropped. Reconnect cost on slow networks (or post-IDLE-timeout) is multiple seconds when it could be a single round-trip.Expected behavior
Configure a
tls.LRUClientSessionCacheper account (or shared). Verify session resumption is happening with a debug log.Why it's hard
Both IMAP (via
connectWithOptions) and SMTP (tls.Dial) bypass the cache today. The fix is small but has to be applied in three places consistently and the cache lifetime must be tied to account credentials.