Re: [Mailman-Developers] MM 3 and Postfix + Apache

Tom Browder writes:
On Thu, Mar 6, 2014 at 1:36 PM, Stephen J. Turnbull <stephen@xemacs.org> wrote:
Barry Warsaw writes:
BTW Tom, are you trying to run MM2 and MM3 concurrently? I'd like I do this already, but with Exim4 as MTA. It's not hard. Of course if both installations have lists of the same name (including the
There will not be any identical names, so maybe doable fairly easily with Postfix?
Yeah, I suppose so. I don't recall how Postfix does the dispatching.
Exim basically has a chain of what it calls "routers", which look at the message and metadata (the envelope addressee's mailbox is what I use), apply other tests (checking for the list's config pickle is what I use, but it would be possible to query a database or even call out to the Mailman3 REST API -- probably a bad idea, since if Mailman is down, the router will fail, but possible), and dispatch the message to a transport for delivery (piping to the Mailman program). Routers are "first full match wins", so it's quite easy to understand the logic. In particular, a "one host, multiple Mailman installations" setup requires just one router per Mailman installation. The router's check for a file system object is what disambiguates the installations.
Usually Postfix is configured to route mail with a set of sendmail- like aliases files, so you just define different alias files for each Mailman installation and configure Postfix to look at them with the alias_database directive in postfix/main.cf. I guess Mailman itself can be used to generate them without much trouble.
What I can't help with on Postfix, and something I suspect Barry will be concerned with, is virtual domains where dom1 prefers the tried and true (Mailman2) and dom2 is ready to try something new (Mailman3). In Exim this is no harder; the routers just check for the virtual domain as well as the mailbox and config files. I don't know how Postfix would handle this; the alias files only know about mailboxes as far as I know. The virtual domains are sorted out by a different mechanism.
Regards,
Steve

On Mar 07, 2014, at 10:07 AM, Stephen J. Turnbull wrote:
Usually Postfix is configured to route mail with a set of sendmail- like aliases files, so you just define different alias files for each Mailman installation and configure Postfix to look at them with the alias_database directive in postfix/main.cf. I guess Mailman itself can be used to generate them without much trouble.
What I can't help with on Postfix, and something I suspect Barry will be concerned with, is virtual domains where dom1 prefers the tried and true (Mailman2) and dom2 is ready to try something new (Mailman3). In Exim this is no harder; the routers just check for the virtual domain as well as the mailbox and config files. I don't know how Postfix would handle this; the alias files only know about mailboxes as far as I know. The virtual domains are sorted out by a different mechanism.
From src/mailman/docs/MTA.rst, we set these Postfix variables:
transport_maps =
hash:/path-to-mailman/var/data/postfix_lmtp
local_recipient_maps =
hash:/path-to-mailman/var/data/postfix_lmtp
relay_domains =
hash:/path-to-mailman/var/data/postfix_domains
and then mm3 writes those files and postmaps them to keep them current.
The thing that I haven't checked is if you have some mm2 lists that obviously would not be defined in the above files, does Postfix fall back to delivering the messages to mm2's mail command?
-Barry
participants (2)
-
Barry Warsaw
-
Stephen J. Turnbull