-
Notifications
You must be signed in to change notification settings - Fork 236
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
🐛 N°7917 SF#2272 EmailLaminas.php: Fix Message-ID format #671
Conversation
Kudos for the detailed PR 🙌 |
Thanks for your contribution |
Below is a comparison of the header between emails sent out from different versions of iTop. iTop 3.0: Message-ID: <iTop_UserRequest_112260_1721928197.377377@ffb5bc6b0d3ad4e791061d65c153a36b-production.openitop.org> iTop 3.1.1-1: Message-ID: =?UTF-8?Q?iTop=5FUserRequest=5F9142=5F1823562304.671192@a968b15fb014ecc1b0fa085ab5c5c2f6-production.openitop.org?= |
I just tested it, and this indeed fixes the support/3.1 before this PR
support/3.1 after this PR
I noticed |
as suggested by @steffunky in PR 671
Thanks for your PR @vlk-charles!! Could you send me your full name and postal address to |
@steffunky Thank you for the stickers. Address sent. Will the fix be forward-ported to 3.2 and future versions? |
Base information
Symptom
iTop since version 3.1 (after switching to Laminas-mail, N°4307) sends emails with incorrectly formatted Message-ID. This sometimes results in Gmail classifying them as spam or even outright refusing to accept them for delivery. In another case, a client was reporting issues with their (possibly custom) system for automated email processing. More information is in the above-linked SourceForge issue.
Reproduction procedure
<[email protected]>
and anX-Google-Original-Message-ID
header was added.Cause
After switching to the Laminas-mail library, the
addHeaderLine
function is used to add theMessage-ID
header to the email that is about to be sent. This function can add arbitrary headers and uses Q-encoding to encode the entire value. This is not allowed for structured headers such asMessage-ID
according to the relevant RFCs (RFC 2047, RFC 2822).Proposed solution
Laminas-mail provides a
MessageId
class. An object of this type is created and added usingaddHeader
.Checklist before requesting a review
Checklist of things to do before PR is ready to merge