Skip to content

Wait for IMAP server greeting before authenticating#248

Merged
wesm merged 1 commit intomainfrom
issue-218
Apr 7, 2026
Merged

Wait for IMAP server greeting before authenticating#248
wesm merged 1 commit intomainfrom
issue-218

Conversation

@wesm
Copy link
Copy Markdown
Owner

@wesm wesm commented Apr 7, 2026

Closes #218

Summary

  • Add WaitGreeting() call after IMAP dial and before Login/Authenticate, per RFC 3501 client requirements
  • Fixes unexpected EOF when connecting through local OAuth proxies (e.g. email-oauth2-proxy) that need time to establish the upstream TLS session before issuing the greeting

🤖 Generated with Claude Code

The IMAP client sent LOGIN/AUTHENTICATE immediately after TCP
connect without waiting for the server's `* OK` greeting. This
broke connections through local OAuth proxies (e.g.
email-oauth2-proxy) where the proxy needs time to establish its
upstream TLS session before it can issue the greeting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@roborev-ci
Copy link
Copy Markdown

roborev-ci bot commented Apr 7, 2026

roborev: Combined Review (0aefd7e)

No medium-or-higher findings; the change looks clean.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@wesm wesm merged commit 3720b26 into main Apr 7, 2026
4 checks passed
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.

IMAP Login can run before server greeting (breaks email-oauth2-proxy / fast upstream setup)

1 participant