1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 10:22:42 +01:00
phorge-phorge/src/applications/metamta
epriestley d9cdbdb9fa When we fail to process mail, tell the user about it
Summary:
Ref T4371. Ref T4699. Fixes T3994.

Currently, we're very conservative about sending errors back to users. A concern I had about this was that mistakes could lead to email loops, massive amounts of email spam, etc. Because of this, I was pretty hesitant about replying to email with more email when I wrote this stuff.

However, this was a long time ago. We now have Message-ID deduplication, "X-Phabricator-Sent-This-Mail", generally better mail infrastructure, and rate limiting. Together, these mechanisms should reasonably prevent anything crazy (primarily, infinite email loops) from happening.

Thus:

  - When we hit any processing error after receiving a mail, try to send the author a reply with details about what went wrong. These are limited to 6 per hour per address.
  - Rewrite most of the errors to be more detailed and informative.
  - Rewrite most of the errors in a user-facing voice ("You sent this mail..." instead of "This mail was sent..").
  - Remove the redundant, less sophisticated code which does something similar in Differential.

Test Plan:
  - Using `scripts/mail/mail_receiver.php`, artificially received a pile of mail.
  - Hit a bunch of different errors.
  - Saw reasonable error mail get sent to me.
  - Saw other reasonable error mail get rate limited.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T3994, T4371, T4699

Differential Revision: https://secure.phabricator.com/D8692
2014-04-03 18:43:18 -07:00
..
action When we fail to process mail, tell the user about it 2014-04-03 18:43:18 -07:00
adapter Fix Mailgun Reply-To handling 2014-03-29 10:53:52 -07:00
application Mailgun receive support 2014-01-21 10:36:33 -08:00
constants When we fail to process mail, tell the user about it 2014-04-03 18:43:18 -07:00
contentsource Use DifferentialRevisionEditor in lipsum 2014-03-11 13:02:00 -07:00
controller Mailgun receive support 2014-01-21 10:36:33 -08:00
exception Allow MetaMTA adapters to indicate that a mail is permanently undeliverable 2013-08-30 08:21:50 -07:00
garbagecollector Add a GC for sent and received mail 2014-02-03 10:51:31 -08:00
management Remove retry/failure mechanisms from MetaMTA 2014-02-01 14:35:42 -08:00
parser Fix over-matching of quoted text for message bodies beginning with "On..." 2013-12-06 15:47:37 -08:00
query Allow unsubscription from projects 2014-02-11 07:45:56 -08:00
receiver When we fail to process mail, tell the user about it 2014-04-03 18:43:18 -07:00
replyhandler Expand aggregate email recipients prior to multiplexing 2014-02-01 14:35:55 -08:00
storage When we fail to process mail, tell the user about it 2014-04-03 18:43:18 -07:00
view Port Differential mail features forward to transactions 2014-03-11 13:02:06 -07:00
PhabricatorMail.php Require a viewer to load handles 2013-02-28 17:15:09 -08:00
PhabricatorMetaMTAWorker.php Remove retry/failure mechanisms from MetaMTA 2014-02-01 14:35:42 -08:00