diff options
Diffstat (limited to 'src/mailman/interfaces/mta.py')
| -rw-r--r-- | src/mailman/interfaces/mta.py | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/mailman/interfaces/mta.py b/src/mailman/interfaces/mta.py index a8c794750..3dd1793e5 100644 --- a/src/mailman/interfaces/mta.py +++ b/src/mailman/interfaces/mta.py @@ -21,7 +21,8 @@ from __future__ import absolute_import, unicode_literals __metaclass__ = type __all__ = [ - 'IMailTransportAgent', + 'IMailTransportAgentAliases', + 'IMailTransportAgentDelivery', ] @@ -29,8 +30,8 @@ from zope.interface import Interface -class IMailTransportAgent(Interface): - """Interface to the MTA.""" +class IMailTransportAgentAliases(Interface): + """Interface to the MTA aliases generator.""" def create(mlist): """Tell the MTA that the mailing list was created.""" @@ -40,3 +41,24 @@ class IMailTransportAgent(Interface): def regenerate(): """Regenerate the full aliases file.""" + + + +class IMailTransportAgentDelivery(Interface): + """Interface to the MTA delivery strategies.""" + + def deliver(mlist, msg, msgdata): + """Deliver a message to a mailing list's recipients. + + Ordinarily the mailing list is consulted for delivery specifics, + however the message metadata dictionary can contain additional + directions to control delivery. Specifics are left to the + implementation. + + :param mlist: The mailing list being delivered to. + :type mlist: `IMailingList` + :param msg: The original message being delivered. + :type msg: `Message` + :param msgdata: Additional message metadata for this delivery. + :type msgdata: dictionary + """ |
