#343 Write custom Received: headers top most [PHPMailer v5.1]

5.0
wont-fix
nobody
Phpmailer (265)
5
2015-01-29
2010-01-31
Francois
No

A custom Received: header added with AddCustomHeader() should appear as the top most header in the message sent.

PHPMailer currently outputs all custom headers first (bottom most) then its own headers (like Subject, To, From, etc.)

This is an issue with anti-SPAM software. Specifically, it triggers the MSGID_FROM_MTA_HEADER rule in SpamAssassin (see: http://wiki.apache.org/spamassassin/Rules/MSGID_FROM_MTA_HEADER ), because the Message-ID: header (generated by PHPMailer) is located above the custom Received: header.

It does make sense to add a custom Received; header for webmails or other web-based mail forms, for the first web-browser->PHPMailer hop. E.g. the Horde IMP webmail does add such a Received: header:

Received: from 24-75-33-231.dclient.example.com
(24-75-33-231.dclient.example.com [24.75.33.231]) by webmail.example.com
(Horde MIME library) with HTTP; Sun, 31 Jan 2010 17:54:00 +0100

Discussion

  • Marcus Bointon
    Marcus Bointon
    2013-03-25

    • status: open --> accepted
    • milestone: --> 5.0
     
  • Marcus Bointon
    Marcus Bointon
    2013-10-14

    • status: accepted --> wont-fix