From 94daf63ca52a059b16bdfa390f077ec6062318f2 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 29 Feb 2012 15:30:56 -0800 Subject: [PATCH] Add an explicit "this mail came from Phabricator" header Summary: See T926. If you want to write a mail rule that, e.g., captures Differential mail but ignores people replying to it, it's kind of tricky right now. You can use the 'X-Mail-Transport-Agent' header but that's not obvious and it's not necessarily stable. Add a nice, obvious "X-Phabricator-Sent-This-Message" header. Test Plan: Sent myself some mail, verified the header appeared. Reviewers: vrana, btrahan, fugalh, jungejason Reviewed By: jungejason CC: aran, epriestley Maniphest Tasks: T926 Differential Revision: https://secure.phabricator.com/D1732 --- .../metamta/storage/mail/PhabricatorMetaMTAMail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/metamta/storage/mail/PhabricatorMetaMTAMail.php b/src/applications/metamta/storage/mail/PhabricatorMetaMTAMail.php index c85e76ca88..d1e5cfa9b8 100644 --- a/src/applications/metamta/storage/mail/PhabricatorMetaMTAMail.php +++ b/src/applications/metamta/storage/mail/PhabricatorMetaMTAMail.php @@ -440,9 +440,9 @@ class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO { } } + $mailer->addHeader('X-Phabricator-Sent-This-Message', 'Yes'); $mailer->addHeader('X-Mail-Transport-Agent', 'MetaMTA'); - // If the message has mailtags, filter out any recipients who don't want // to receive this type of mail. $mailtags = $this->getParam('mailtags');