Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Mailer] Too strict syntax validation for In-Reply-To and References headers #37361

Closed
@ThomasLandauer

Description

@ThomasLandauer

Symfony version(s) affected: 4.4.10, but also present in master

Description
In-Reply-To and References headers are validated as ID-Headers: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Mime/Header/Headers.php#L37
...which leads to validating them as Address: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Mime/Header/IdentificationHeader.php#L86

Yes, this is exactly what RFC 2822 is saying.

However, I'm suggesting to loosen the validation.

Why? When replying to an email, the original email's Message-ID goes into In-Reply-To or References. This means: If the value doesn't adhere to the msg-id spec, I can't do anything about it! The only choice I'm having is to include it as-is, or omit the header entirely. And IMO including it is the by far better choice, since it gives the recipient's MUA the possibility to correctly append it to an existing thread.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions