[Mailman-Developers] Mailman 3 and LMTP

Barry Warsaw barry at python.org
Sat Nov 28 23:53:00 CET 2009


Hi everybody,

I'm getting very near ready to release another alpha of Mailman 3, and on the
prompting of a private message from Robert Niederreiter I took some time to
fire up a VM and actually try Postfix+LMTP delivery in an experimental
production system.  I'd like to get some feedback from the Postfix experts in
the crowd so that we can update the wiki page here:

    http://wiki.list.org/display/DEV/LMTP+process

FTR: the VM is running Ubuntu Karmic Koala 9.10 server with Postfix 2.6.5 and
Mailman 3.0 from the lp:mailman bzr trunk.

To start with, I mostly followed the instructions in the wiki.  I tried using
the standard lmtp transport in master.cf, creating /etc/postfix/mailman_lists
as described in the wiki (not the dedicated list server example, but the
earlier one on the page).  I actually used:

# Key                   # Value
test at xxx.example.com    lmtp:xxx.example.com

where 'xxx.example.com' is replaced by my VM's host name.

The first gotcha is that unless you start Mailman as root, you can't bind its
LMTP server to port 24, which is Postfix's default.  By default Mailman's LMTP
server listens on localhost:8024, so you either need to append ':8024' on the
Value above, or set

    lmtp_tcp_port = 8024

in Postfix's main.cf.  I ended up doing the latter, but both work.

I set up transport_maps and local_recipient_maps just as outlined in the wiki
page, fired everything up, and then sent a message to the VM's Postfix while
tailing the logs.  I kept seeing "Connection refused" messages from Postfix
and it never hit Mailman's LMTP server.

This was highly confusing because I could see in the Postfix logs that it was
finding the right IP address for its own hostname and it was trying the right
port number.  Mailman's lmtp.log file claimed it was listening on the right IP
and port, and I could even telnet to it just fine.  So what was Postfix doing?

It seems that Karmic is playing tricks with /etc/hosts.  I've got DNS set up
to correctly resolve the VM's hostname, but there was actually an entry in
/etc/hosts that set xxx.example.com to 127.0.1.1.  I'm not entirely sure which
process looks at what, when, but clearly this inconsistency was a key part of
the problem.  The other thing that surprised me was that Postfix was also
consulting /var/spool/postfix/etc/hosts, and I had to change both /etc/hosts
and that file as well, so that the IP addresses jived with DNS.  This is
unsatisfactory, but it seemed critical to getting things working.

The last piece of the puzzle was to not use Postfix's standard lmtp server in
master.cf, but to define a new one like so:

mailman3 unix - - - - - lmtp -o disable_dns_lookups=yes

and then change the mailman_lists transport map to

# Key                   # Value
test at xxx.example.com    mailman3:xxx.example.com

After a restart, everything suddenly worked exactly as expected.

Robert was having a different problem, but hopefully he will follow up here
with his experience and let us know if any of the above helps.  If any Postfix
experts have words of wisdom to make this better, please let me know.

I probably need to work on better dropping of privileges for qrunners so that
you can 'bin/mailman start' as root, and once the LMTP runner binds to port
24, it can drop privs to 'mailman'.  I'll put that on the list for something
to do after the next alpha.

I'd also like to try to resurrect William Mead's LMTP branch.  Sadly, it won't
merge cleanly into trunk any more (not the least of which because it's in the
wrong bzr format).  If anybody would like to contribute that before I get to
it, I'd be grateful.

The good news is that I think Mailman 3 is getting more real every day.  My
plan over the next few weeks is:

* release alpha 4
* get i18n translations working
* complete the split of the pipermail project
* hopefully get Patrick and friends going on the web u/i
* announce something <wink>
* create a live test list that anybody can subscribe to

If you've been waiting to play with Mailman 3, wait no longer!

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/mailman-developers/attachments/20091128/a4f00509/attachment.pgp>


More information about the Mailman-Developers mailing list