1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-22 12:41:19 +01:00
phorge-phorge/src/applications/metamta
epriestley ff220acae6 Don't bounce mail messages if any recipient was reserved
Summary:
Ref T13222. If we receive a message and nothing processes it, we normally try to send the user an error message like "hey, nothing handled this, maybe you got the address wrong".

Just skip the "send them an error message" part if any recipient was reserved, so if you "Reply All" to a message that is "From: noreply@phabricator" you don't get a relatively unhelpful error.

This also makes sure that the "void" address doesn't generate bounces if the "From" is a valid user email address (e.g., with `metamta.can-send-as-user`). That is:

  - Phabricator needs to send a mail with only "CC" users.
  - Phabricator puts the "void" address in "To" as a placeholder.
  - The "void" address happens to route back to Phabricator.

We don't want that mail to bounce to anywhere. Normally, it won't:

  - From is usually "noreply@phabricator", which isn't a user, so we won't send anything back: we only send mail to verified user email addresses.
  - The message will have "X-Phabricator-Sent-This-Message: true" so we won't process it at all.

...but this is another layer of certainty.

Test Plan: Used `bin/mail receive-test` to receive mail to an invalid, unreserved address (bounce/error email) and an invalid, reserved address (no bounce/error email).

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13222

Differential Revision: https://secure.phabricator.com/D19987
2019-01-17 19:17:37 -08:00
..
action When we fail to process mail, tell the user about it 2014-04-03 18:43:18 -07:00
adapter Add a Twilio SMS message adapter 2019-01-16 13:25:59 -08:00
application Support Postmark inbound mail via webhook 2018-02-08 06:25:26 -08:00
applicationpanel Allow multiple mail receivers to react to an individual email 2019-01-16 12:28:02 -08:00
command Use PhutilClassMapQuery 2015-07-07 22:51:57 +10:00
constants Don't bounce mail messages if any recipient was reserved 2019-01-17 19:17:37 -08:00
contentsource Modularize content sources 2016-03-26 11:59:45 -07:00
controller Update Postmark adapter for multiple mail media 2019-01-16 13:00:34 -08:00
edge MetaMTA - more progress towards a mail application 2015-06-23 11:37:14 -07:00
editor Prevent application email addresses from shadowing user email addresses 2019-01-16 13:28:08 -08:00
engine Fix an issue where "CC"-only email improperly wiped CC addresses 2019-01-16 13:22:43 -08:00
engineextension Manage object mailKeys automatically in Mail instead of storing them on objects 2018-04-25 06:46:58 -07:00
exception Apply some autofix linter rules 2014-09-10 06:55:05 +10:00
future Add a Twilio SMS message adapter 2019-01-16 13:25:59 -08:00
garbagecollector Support DestructionEngine in MetaMTAMail 2018-02-02 14:37:33 -08:00
herald Prevent "Call webhooks" Herald action from appearing in UI for adapters which can't fire it 2018-02-11 06:15:29 -08:00
management Refactor mail to produce an intermediate "bag of strings" object in preparation for SMS 2019-01-16 12:58:29 -08:00
message Add a Twilio SMS message adapter 2019-01-16 13:25:59 -08:00
parser Extend from Phobject 2015-06-15 18:02:27 +10:00
phid Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
query Allow multiple mail receivers to react to an individual email 2019-01-16 12:28:02 -08:00
receiver Update Mail test adapter for the newer adapter API and make all tests pass 2019-01-16 13:01:25 -08:00
replyhandler Drop empty inbound mail at the beginning of the receive workflow, not inside object handlers 2019-01-04 13:50:21 -08:00
stamp Fix a mail stamp issue with blocking reviewers 2018-02-13 17:56:21 -08:00
storage Don't bounce mail messages if any recipient was reserved 2019-01-17 19:17:37 -08:00
typeahead Fix packages(project) to work properly and add it to "MailableFunctionDatasource" 2018-10-19 13:53:27 -07:00
util Prevent application email addresses from shadowing user email addresses 2019-01-16 13:28:08 -08:00
view Rename "MetaMTA" mail attachments and add more mail message objects 2019-01-04 15:23:44 -08:00
PhabricatorMetaMTAWorker.php Send permanent dameon failures to the log, even when not running in verbose mode 2017-06-08 15:26:19 -07:00