-
-
Notifications
You must be signed in to change notification settings - Fork 32k
IndexError in email parse_message_id #105802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If you scroll far enough to the right, the traceback actually reveals the (problematic part of) the message-id. I have seen this in Microsoft-generated messages recently; they incorrectly create square brackets around the message-id. Here is a simple test message which reproduces the problem.
You need to trigger Message-Id parsing to exhibit the problem. Try this to repro.
with the sample message in |
Bug report
I apologize in advance for this bug report. It's unfortunately short on details.
In the email module, in file _header_value_parser.py, I am seeing a HeaderParseError: "expected atom at a start of dot-atom-text but found '[83c48dddbea7492e873224a5ae1c04be...'" that triggers an IndexError: list index out of range.
Unfortunately, this is happening in the REST server for Mailman's HyperKitty, so the only information I have is:
The HeaderParseError is apparently leaving obs_local_part in a bad state (the expression following line 1516 includes
obs_local_part[0]
andobs_local_part[1]
.I have not been able to find the email text to find out what the Message-Id header actually is.
Your environment
Python 3.8.7 (default, Nov 15 2022, 11:52:53)
[GCC 8.5.0 20210514 (Red Hat 8.5.0-15)] on linux
GNU Mailman 3.3.5 (Tom Sawyer)
Red Hat Enterprise Linux release 8.7 (Ootpa)
@warsaw , @bitdancer , @maxking (You are in the Experts Index.)
Linked PRs
The text was updated successfully, but these errors were encountered: