mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 04:58:47 +03:00
According to <https://datatracker.ietf.org/doc/html/rfc8098#section-3.2.3> Original-Recipient field values in MDNs MUST NOT be included if the information about original recipient is not available. Original recipient may be obtained from ORCPT parameter of SMTP envelope or from Original-Recipient header which MTAs are expected to convert Original-Recipient to. The way we have been using Original-Recipient field is not correct. Technically we should look for Original-Recipient header on the message when downloading it from IMAP and then copy the value into MDN, but simply assuming it is never there is more correct than always assuming it is the same as our current address. I also grepped for Original-Recipient and removed it together with Reporting-UA from the tests. Orignal-Recipient is now only left in NDN (bounce messages) test data, there it is correct as this field is added by MTAs that have direct access to ORCPT parameter.