~sambuddhabasu1/mailman/fix_mailman_run_error

« back to all changes in this revision

Viewing changes to mailman/mta/null.py

  • Committer: Barry Warsaw
  • Date: 2009-01-07 04:59:42 UTC
  • Revision ID: barry@list.org-20090107045942-f53zhllwyie3mgna
Add a NullMTA for MTAs like Exim which don't require alias file writes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2001-2009 by the Free Software Foundation, Inc.
 
2
#
 
3
# This file is part of GNU Mailman.
 
4
#
 
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.
 
9
#
 
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.
 
14
#
 
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/>.
 
17
 
 
18
"""Creation/deletion hooks for the MTAs that do things automatically.
 
19
 
 
20
Exim one example of an MTA that Just Works.
 
21
"""
 
22
 
 
23
__metaclass__ = type
 
24
__all__ = [
 
25
    'LMTP',
 
26
    ]
 
27
 
 
28
 
 
29
from zope.interface import implements
 
30
 
 
31
from mailman.interfaces.mta import IMailTransportAgent
 
32
 
 
33
 
 
34
class NullMTA:
 
35
    """Null MTA that just satisfies the interface."""
 
36
 
 
37
    implements(IMailTransportAgent)
 
38
 
 
39
    def create(self, mlist):
 
40
        """See `IMailTransportAgent`."""
 
41
        pass
 
42
 
 
43
    def delete(self, mlist):
 
44
        """See `IMailTransportAgent`."""
 
45
        pass
 
46
 
 
47
    def regenerate(self):
 
48
        """See `IMailTransportAgent`."""
 
49
        pass