maddy

Fork https://github.com/foxcpp/maddy

git clone git://git.lin.moe/go/maddy.git

 1# Mailman 3
 2
 3Setting up Mailman 3 with maddy involves some additional work as compared to
 4other MTAs as there is no Python package in Mailman suite that can generate
 5address lists in format supported by maddy.
 6
 7We assume you are already familiar with Mailman configuration guidelines and
 8how stuff works in general/for other MTAs.
 9
10## Accepting messages
11
12First of all, you need to use NullMTA package for mta.incoming so Mailman will
13not try to generate any configs. LMTP listener is configured as usual.
14```
15[mta]
16incoming: mailman.mta.null.NullMTA
17lmtp_host: 127.0.0.1
18lmtp_port: 8024
19```
20
21After that, you will need to configure maddy to send messages to Mailman.
22
23The preferable way of doing so is destination_in and table.regexp:
24```
25msgpipeline local_routing {
26    destination_in regexp "first-mailinglist(-(bounces\+.*|confirm\+.*|join|leave|owner|request|subscribe|unsubscribe))?@lists.example.org" {
27        deliver_to lmtp tcp://127.0.0.1:8024
28    }
29    destination_in regexp "second-mailinglist(-(bounces\+.*|confirm\+.*|join|leave|owner|request|subscribe|unsubscribe))?@lists.example.org" {
30        deliver_to lmtp tcp://127.0.0.1:8024
31    }
32
33    ...
34}
35```
36
37A more simple option is also meaningful (provided you have a separate domain
38for lists):
39```
40msgpipeline local_routing {
41    destination lists.example.org {
42        deliver_to lmtp tcp://127.0.0.1:8024
43    }
44
45    ...
46}
47```
48But this variant will lead to inefficient handling of non-existing subaddresses.
49See [Mailman Core issue 14](https://gitlab.com/mailman/mailman/-/issues/14) for
50details. (5 year old issue, sigh...)
51
52## Sending messages
53
54It is recommended to configure Mailman to send messages using Submission port
55with authentication and TLS as maddy does not allow relay on port 25 for local
56clients as some MTAs do:
57```
58[mta]
59# ... incoming configuration here ...
60outgoing: mailman.mta.deliver.deliver
61smtp_host: mx.example.org
62smtp_port: 465
63smtp_user: mailman@example.org
64smtp_pass: something-very-secret
65smtp_secure_mode: smtps
66```
67
68If you do not want to use TLS and/or authentication you can create a separate
69endpoint and just point Mailman to it. E.g.
70```
71smtp tcp://127.0.0.1:2525 {
72    destination postmaster $(local_domains) {
73        deliver_to &local_routing
74    }
75    default_destination {
76        deliver_to &remote_queue
77    }
78}
79```
80
81Note that if you use a separate domain for lists, it need to be included in
82local_domains macro in default config. This will ensure maddy signs messages
83using DKIM for outbound messages. It is also highly recommended to configure
84ARC in Mailman 3.