Page MenuHomePhabricator

Don't bounce mail messages if any recipient was reserved
ClosedPublic

Authored by epriestley on Jan 17 2019, 2:47 PM.
Tags
None
Referenced Files
F14407729: D19987.diff
Tue, Dec 24, 3:34 AM
Unknown Object (File)
Mon, Dec 23, 11:55 PM
Unknown Object (File)
Mon, Dec 16, 11:50 PM
Unknown Object (File)
Wed, Dec 11, 1:28 PM
Unknown Object (File)
Tue, Dec 10, 5:00 AM
Unknown Object (File)
Sun, Dec 8, 7:44 PM
Unknown Object (File)
Fri, Dec 6, 4:09 PM
Unknown Object (File)
Thu, Dec 5, 3:15 PM
Subscribers
None

Details

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).

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley edited the summary of this revision. (Show Details)
  • "Them email" may not be entirely grammatical.
epriestley edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jan 17 2019, 9:39 PM
This revision was automatically updated to reflect the committed changes.