
Hey,
As promised a while ago, I've prepared Kubernetes PoC for Mailman 3 (Helm chart) which is currently deployed into GCP (GKE Autopilot) and exposed at http://test.mailman4.com/postorius/lists/
The setup is based on Abhilash's container images <https://github.com/maxking/docker-mailman> (up to version 0.3.11 - see below why). Outbound delivery is relayed via Mailgun (due to the outbound port 25 is blocked in GCP), while income emails received by the local Postfix container.
When tried previously,
...I've faced only two disappointing issues: 1) HK whitelisting mechanism
which makes no sense in a dynamic Kubernetes environment and 2) a shared volume, which is needed for Core and Postfix to communicate.
The first issue has been resolved by allowing Django's any host notation <https://gitlab.com/mailman/hyperkitty/-/merge_requests/297> (thank you folks!), and the second one I've resolved by myself with help of a sidecar container built from the following code: https://github.com/danil-smirnov/mailman-postfix-extender
This solution moves Postfix configuration from file-based to network-based without touching a line of Mailman code. (Of course, it's PoC still and would look much better if it's part of the Mailman 3 codebase, covered by tests, etc.)
There are a couple of other issues that I've worked around but have to address to move to a production-grade solution:
- Hardcoded hostnames issue ( https://github.com/maxking/docker-mailman/issues/449) Worked around by adding some redundant code <https://github.com/danil-smirnov/mailman-helm-chart/blob/main/templates/mail...>
- lmtp_host parameter issue ( https://gitlab.com/mailman/mailman/-/issues/852) Worked around by using IP addresses in postfix_lmtp file (possible up to 0.3.11 version of docker images only - due to recent change <https://github.com/maxking/docker-mailman/commit/c10aa6fce479a78a6c51ac41f0f...> ).
The code could be found in this repository: https://github.com/danil-smirnov/mailman-helm-chart
I'm glad I've finally shared this, I hope it'll help to improve Mailman 3 compatibility with the modern orchestration tools.
With my best regards, Danil Smirnov Mailman3.com
On Sun, Dec 20, 2020 at 1:51 PM Stephen J. Turnbull < turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Danil Smirnov writes:
Sorry for the confusion - I should write "would allow" instead of "allows" as using socketmap_table would be a great feature but it obviously requires a new endpoint in Mailman core which does not exist yet.
Ah, OK, so what exists now is the Postfix docker (which you provided a reference).
Otherwise everything looks fine and with those two issues resolved/mitigated there is no problem to deploy Mailman 3 in Kubernetes, I can prepare an example Helm chart for it.
That would be great!
Steve