~barry/mailman/templatecache

« back to all changes in this revision

Viewing changes to src/mailman/docs/MTA.rst

  • Committer: Barry Warsaw
  • Date: 2013-09-01 15:12:51 UTC
  • mfrom: (7184.1.37 3.0)
  • Revision ID: barry@list.org-20130901151251-1jmdsqmvbq1lxxxo
trunk merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
Hooking up your mail server
3
3
===========================
4
4
 
5
 
Mailman needs to be hooked up to your mail server (a.k.a. *mail transport
6
 
agent* or *MTA*) both to accept incoming mail and to deliver outgoing mail.
7
 
Mailman itself never delivers messages to the end user; it lets its immediate
8
 
upstream mail server do that.
9
 
 
10
 
The preferred way to allow Mailman to accept incoming messages from your mail
11
 
server is to use the `Local Mail Transfer Protocol`_ (LMTP_) interface.  Most
12
 
open source mail server support LMTP for local delivery, and this is much more
13
 
efficient than spawning a process just to do the delivery.
14
 
 
15
 
Your mail server should also accept `Simple Mail Transfer Protocol`_ (SMTP_)
16
 
connections from Mailman, for all outgoing messages.
17
 
 
18
 
The specific instructions for hooking your mail server up to Mailman differs
19
 
depending on which mail server you're using.  The following are instructions
20
 
for the popular open source mail servers.
21
 
 
22
 
Note that Mailman provides lots of configuration variables that you can use to
23
 
tweak performance for your operating environment.  See the
 
5
Mailman needs to communicate with your *MTA* (*mail transport agent*
 
6
or *mail server*, the software which handles sending mail across the
 
7
Internet), both to accept incoming mail and to deliver outgoing mail.
 
8
Mailman itself never delivers messages to the end user.  It sends them
 
9
to its immediate upstream MTA, which delivers them.  In the same way,
 
10
Mailman never receives mail directly.  Mail from outside always comes
 
11
via the MTA.
 
12
 
 
13
Mailman accepts incoming messages from the MTA using the `Local Mail
 
14
Transfer Protocol`_ (LMTP_) interface.  Mailman can use other incoming
 
15
transports, but LMTP is much more efficient than spawning a process
 
16
just to do the delivery.  Most open source MTAs support LMTP for local
 
17
delivery.  If yours doesn't, and you need to use a different
 
18
interface, please ask on the `mailing list or on IRC`_.
 
19
 
 
20
Mailman passes all outgoing messages to the MTA using the `Simple Mail
 
21
Transfer Protocol`_ (SMTP_).
 
22
 
 
23
Cooperation between Mailman and the MTA requires some configuration of
 
24
both.  MTA configuration differs for each of the available MTAs, and
 
25
there is a section for each one.  Instructions for Postfix are given
 
26
below.  We would really appreciate contributions of configurations for
 
27
Exim and Sendmail, and welcome information about other popular open
 
28
source mail servers.
 
29
 
 
30
Configuring Mailman to communicate with the MTA is straightforward,
 
31
and basically the same for all MTAs.  In your ``mailman.cfg`` file,
 
32
add (or edit) a section like the following::
 
33
 
 
34
    [mta]
 
35
    incoming: mailman.mta.postfix.LMTP
 
36
    outgoing: mailman.mta.deliver.deliver
 
37
    lmtp_host: 127.0.0.1
 
38
    lmtp_port: 8024
 
39
    smtp_host: localhost
 
40
    smtp_port: 25
 
41
 
 
42
This configuration is for a system where Mailman and the MTA are on
 
43
the same host.
 
44
 
 
45
The ``incoming`` and ``outgoing`` parameters identify the Python
 
46
objects used to communicate with the MTA.  The ``deliver`` module used
 
47
in ``outgoing`` is pretty standard across all MTAs.  The ``postfix``
 
48
module in ``incoming`` is specific to Postfix.  See the section for
 
49
your MTA below for details on these parameters.
 
50
 
 
51
``lmtp_host`` and ``lmtp_port`` are parameters which are used by
 
52
Mailman, but also will be passed to the MTA to identify the Mailman
 
53
host.  The "same host" case is special; some MTAs (including Postfix)
 
54
do not recognize "localhost", and need the numerical IP address.  If
 
55
they are on different hosts, ``lmtp_host`` should be set to the domain
 
56
name or IP address of the Mailman host.  ``lmtp_port`` is fairly
 
57
arbitrary (there is no standard port for LMTP).  Use any port
 
58
convenient for your site.  "8024" is as good as any, unless another
 
59
service is using it.
 
60
 
 
61
``smtp_host`` and ``smtp_port`` are parameters used to identify the
 
62
MTA to Mailman.  If the MTA and Mailman are on separate hosts,
 
63
``smtp_host`` should be set to the domain name or IP address of the
 
64
MTA host.  ``smtp_port`` will almost always be 25, which is the
 
65
standard port for SMTP.  (Some special site configurations set it to a
 
66
different port.  If you need this, you probably already know that,
 
67
know why, and what to do, too!)
 
68
 
 
69
Mailman also provides many other configuration variables that you can
 
70
use to tweak performance for your operating environment.  See the
24
71
``src/mailman/config/schema.cfg`` file for details.
25
72
 
26
73
 
27
 
Exim
28
 
====
29
 
 
30
 
Contributions are welcome!
31
 
 
32
 
 
33
74
Postfix
34
75
=======
35
76
 
131
172
.. _`mydestination`: http://www.postfix.org/postconf.5.html#mydestination
132
173
 
133
174
 
 
175
Exim
 
176
====
 
177
 
 
178
Contributions are welcome!
 
179
 
 
180
 
134
181
Sendmail
135
182
========
136
183
 
137
184
Contributions are welcome!
138
185
 
139
186
 
 
187
.. _`mailing list or on IRC`: START.html#contact-us
140
188
.. _`Local Mail Transfer Protocol`:
141
189
   http://en.wikipedia.org/wiki/Local_Mail_Transfer_Protocol
142
190
.. _LMTP: http://www.faqs.org/rfcs/rfc2033.html