0

The GMAIL POP3 server does not understand the LIST/STAT command when being sent via poplib. Sending those commands on the same exact mailbox via TELNET works. Initially, I thought this is a GMAIL issue, but after doing the manual TELNET login and message retrieval, it seems something else is going on.

I tried for several days to find a solution via StackOverflow, Google and Discord, but no one could give me an answer.

FAILED - Poplib outcome with reproducible code:

output for the failed code

import poplib
mail_box = poplib.POP3_SSL(SERVER, PORT)
mail_box.set_debuglevel(2)
mail_box.user(USER)
mail_box.pass_(PASSWORD)
mail_box.list()[1]

SUCCESS - Manual TELNET test for the mailbox:

output for the successful manual test

Reference to the github issue in cpython:

https://github.com/python/cpython/issues/94019

nexus6
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jul 22 '22 at 09:46
  • I receive an -err command not understood while using the standard poplib library with python. Executing a manual login and list via telnet works fine. – nexus6 Jul 22 '22 at 10:02

0 Answers0