David Krantz via Mailman-users writes:
I am currently running an old (3.3.1) mailman3 setup which works fairly well. However, I am now moving to a new server for various reasons so I will upgrade. The new server will run debian.
I have no disagreements with Odhiambo, but perhaps a different perspective will be useful to you.
A few questions:
- Is it recommended nowadays to run mailman in docker? My current solution runs everything natively in venvs and I use rspamd and postfix for filtering, dkim/arc and SMTP of course.
It's not deprecated, any more than using distro packages is. But our recommendation remains the virtualenv install. That's what most developers use, and it's the common denominator for the other documented variants (docker and distro installs). You are most likely to get useful help from this list if you use the virtualenv install for those reasons. The docker install configuration was somewhat fragile (I think this has improved a lot). It requires some docker knowledge (for example, a no-HyperKitty configuration is provided but you need to find it and enable it by hand).
- Is there any caveats to that upgrade, must I take it in steps? I do not run hyperkitty, our use case does not need archives.
As Odhiambo mentioned, use Python 3.10--3.13. Python 3.14 is currently not supported because aiosmtpd does not support it ("real soon now" is what I've been hearing for months). This is the module that provides the LMTP server that Mailman core uses to receive all mail.
You don't mention your RDBMS. There used to be a couple of caveats with MySQL. ISTR there was a capacity issue with some default (not overall size, Mailman never tests that AFAIK), maybe fixed-length text columns? And for a long time you needed to be careful to enable full Unicode support (emoji and some other stuff that sneaks into "ordinary US English" text live outside the basic multilingual plane).
If you are a journeyman of your RDBMS, perhaps you can set up a situation where the DB server on the new host is configured as a replica, then swap roles when you enable the new one. This gives you a convenient fallback, and ensures that you don't have to do multiple dump-and-restore cycles as you move individual domains. (Not sure why you have to do that.) This would allow downtime of post distribution to be limited to DNS propagation lag, as the switch to the new host would just be updating the A, CNAME, or MX record for each domain.
Otherwise, you can do a dump-and-restore each time you move a domain.
I personally don't know that much about RDBMS software. I would probably install the same version as the old host on the new host. Then trust it to upgrade database format with the software upgrade after the list move is complete, rather than try to replicate or restore across database versions. Restore is probably safer if you want to upgrade the database immediately.
You need to be aware of the queues and data on disk in the $var directory. For the queues, you can just let the old host run until they flush themselves. There is a special "queue" for each list for accumulating its digest, if enabled, usually in $var/lists/$LIST_ID I think (poke around under $MAILMAN_HOME, it's pretty obvious), There is a subcommand for the "mailman" utility which will immediately send the digest for you. I think you'll have to do each list separately.
Since you don't have archives, you don't have to worry about the archiver queues.
If you have made any changes to templates in the $var_dir hierarchy, you'll have to port them over yourself.
Postorius (actually Django) supports a search path for page template hierarchies, which you can place in /etc/mailman3, and configure the path in settings.py. ISTR that Mailman core also supports a search path for email templates, but I don't recall how to configure it. However, most customization of email templates can be done through Postorius, so you may have nothing like that on the email side. But page templates can't be customized through the web, so you have to bring those over file by file.
Anyway, this would be a good time to move custom templates out of $var_dir and into /etc/mailman3.
- I have a very small modification to my current installation so that lists are not displayed on the welcome screen unless you are logged in to the server. Is there any config to do that now?
Not that I know of. We don't have a complicated authentication model, normally we would say "just make them all private". In fact, many organizations do keep that list private to unauthorized users, but they do it at the webserver level, usually via some SSO setup. That said, I doubt that your modification will be hard to port to either Mailman 3.3.10 or the git HEAD.
Let us know if you have further questions.
Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan