]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 2 Jul 2026 07:15:13 +0000 (10:15 +0300)
committerGitHub <noreply@github.com>
Thu, 2 Jul 2026 07:15:13 +0000 (10:15 +0300)
commit262b6a0df5a325e788928ab0cd514fa4786571b4
tree330e942653b40f84100be9b622ac6c1198818793
parentc89b72abed7393d9d428f1e336e3aa02e7ef6ce8
gh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768)

Connecting to a server that does not send a valid IMAP4 greeting, such as
a POP3 server answering on the IMAP port, failed with the unhelpful
"imaplib.IMAP4.error: None".  A meaningful message is now raised instead.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lib/imaplib.py
Lib/test/test_imaplib.py
Misc/NEWS.d/next/Library/2026-07-01-12-00-00.gh-issue-108280.Nq8vTr.rst [new file with mode: 0644]