1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 02:32:42 +01:00
phorge-phorge/externals/phpmailer
epriestley 9d5b8bd14a Remove PHPMailer code which generates bogus "Message-ID" email headers
Summary:
See <https://discourse.phabricator-community.org/t/how-to-override-localhost-localdomain-in-email-message-id/3876/>.

Currently, Phabricator generates a "Message-ID" only in a subset of cases (roughly: when the message is first-in-thread and we expect the thread may have more than one message).

In cases where it does not generate a message ID, it expects the SMTP server to generate one for it. Servers will generally do this, and some ONLY do this (that is, they ignore IDs from Phabricator and replace them). Thus, several pieces of configuration control whether Phabricator attempts to generate a "Message-ID" at all.

The PHPMailer code has fallback behavior which generates a "<random>@localhost.localdomain" message ID. This is never desirable and ignores Phabricator-level configuration that Message IDs should not be generated.

For now, remove this code: it is never the desired behavior and sometimes explicitly contradicts the intent of configuration.

Possibly, a better change may be to make Phabricator always generate a message ID in cases where it isn't forbidden from doing so by configuration. However, that's a more complicated change and it's not clear if/when it would produce better behavior, so start here for now.

Test Plan: Confirmed by affected user (see linked thread).

Differential Revision: https://secure.phabricator.com/D21272
2020-05-19 11:38:58 -07:00
..
class.phpmailer-lite.php Update the "SES" and "sendmail" mailers for the new API; remove "encoding" 2019-01-16 13:18:55 -08:00
class.phpmailer.php Remove PHPMailer code which generates bogus "Message-ID" email headers 2020-05-19 11:38:58 -07:00
class.pop3.php Support SMTP as the mailer. 2012-12-09 02:37:02 -08:00
class.smtp.php Support SMTP as the mailer. 2012-12-09 02:37:02 -08:00
LICENSE Get rid of +x on a bunch of nonexecutable files because I failed to set 2011-04-02 16:47:20 -07:00