Set header as a constant

This commit is contained in:
Adrià Casajús 2022-05-16 10:16:42 +02:00
parent 3578c61366
commit 0da2fd94f1
No known key found for this signature in database
GPG key ID: F0033226A5AFC9B9
2 changed files with 4 additions and 1 deletions

View file

@ -51,3 +51,6 @@ MIME_HEADERS = [h.lower() for h in MIME_HEADERS]
# according to https://datatracker.ietf.org/doc/html/rfc3834#section-3.1.7, this header should be set to "auto-replied"
# however on hotmail, this is set to "auto-generated"
AUTO_SUBMITTED = "Auto-Submitted"
# Yahoo complaint specific header
YAHOO_ORIGINAL_RECIPIENT = "original-rcpt-to"

View file

@ -141,7 +141,7 @@ class ProviderComplaintYahoo(ProviderComplaintOrigin):
"""
report = cls.get_feedback_report(message)
original = cls.get_original_message(message)
rcpt_header = report["original-rcpt-to"]
rcpt_header = report[headers.YAHOO_ORIGINAL_RECIPIENT]
return cls.sanitize_addresses_and_extract_mailbox_id(rcpt_header, original)
@classmethod