IMailTransportAgent -> IMailTransportAgentAliases
[mailman.git] / src / mailman / interfaces / mta.py
blob3dd1793e5366291fcdf846b23a44d40fd6e7dec5
1 # Copyright (C) 2009 by the Free Software Foundation, Inc.
3 # This file is part of GNU Mailman.
5 # GNU Mailman is free software: you can redistribute it and/or modify it under
6 # the terms of the GNU General Public License as published by the Free
7 # Software Foundation, either version 3 of the License, or (at your option)
8 # any later version.
10 # GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 # more details.
15 # You should have received a copy of the GNU General Public License along with
16 # GNU Mailman. If not, see <http://www.gnu.org/licenses/>.
18 """Interface for mail transport agent integration."""
20 from __future__ import absolute_import, unicode_literals
22 __metaclass__ = type
23 __all__ = [
24 'IMailTransportAgentAliases',
25 'IMailTransportAgentDelivery',
29 from zope.interface import Interface
33 class IMailTransportAgentAliases(Interface):
34 """Interface to the MTA aliases generator."""
36 def create(mlist):
37 """Tell the MTA that the mailing list was created."""
39 def delete(mlist):
40 """Tell the MTA that the mailing list was deleted."""
42 def regenerate():
43 """Regenerate the full aliases file."""
47 class IMailTransportAgentDelivery(Interface):
48 """Interface to the MTA delivery strategies."""
50 def deliver(mlist, msg, msgdata):
51 """Deliver a message to a mailing list's recipients.
53 Ordinarily the mailing list is consulted for delivery specifics,
54 however the message metadata dictionary can contain additional
55 directions to control delivery. Specifics are left to the
56 implementation.
58 :param mlist: The mailing list being delivered to.
59 :type mlist: `IMailingList`
60 :param msg: The original message being delivered.
61 :type msg: `Message`
62 :param msgdata: Additional message metadata for this delivery.
63 :type msgdata: dictionary
64 """