Skip to content

Poplib issue with LIST/STAT (-ERR Command not understood) #94019

Open
@test24853

Description

@test24853

Bug report

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.

Reproducible 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:

image

FAILED - Poplib outcome with reproducible code:

image

Your environment

  • CPython versions tested on: Python 3.8.10, Python 3.9.7
  • Operating system and architecture: Win11, Win10, Ubuntu 20.04.3 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtopic-emailtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions