Homec4science

Move some received mail responsibility to applications

Authored by epriestley <git@epriestley.com> on May 14 2013, 19:57.

Description

Move some received mail responsibility to applications

Summary:
Ref T1205. Continuation of D5915.

Currently, PhabricatorMetaMTAReceivedMail has all the logic for routing mail. In particular:

  • New mail receivers in applications must edit it.
  • Mail receivers don't drop out when applications are uninstalled.

Applications have some logic in subclasses of PhabricatorMailReplyHandler, but this class is a bit of a mess. It is also heavily based on the assumption that mail receivers are objects (like revisions), but this is not true in at least two cases today (creating new tasks with bugs@, creating a new Conpherence thread) and likely other cases in the future (e.g., revision-by-mail).

Move this logic into a new PhabricatorMailReceiver classtree. This is similar to PhabricatorMailReplyHandler but a bit cleaner and more general. I plan to heavily reduce the responsibilities of PhabricatorMailReplyHandler or possibly eliminate it entirely.

For now, the new classtree doesn't do much of interest. The only behavioral change this diff causes is that Phabricator will now reject mail to an application when that application is uninstalled.

I also moved all the ReplyHandler classes into mail/ directories in their respective applications.

Test Plan: Unit tests, used receive test to route mail to various objects.

Reviewers: btrahan

Reviewed By: btrahan

CC: Afaque_Hussain, edward, aran

Maniphest Tasks: T1205

Differential Revision: https://secure.phabricator.com/D5922

Details

Committed
epriestley <git@epriestley.com>May 14 2013, 19:57
Pushed
aubortJan 31 2017, 17:16
Parents
rPHaf220fddc141: Add get Releeph Requests conduit method
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH341079c3cf25: Move some received mail responsibility to applications (authored by epriestley <git@epriestley.com>).May 14 2013, 19:57