
- On 4/16/25 01:04, Sam Darwin via Mailman-users wrote:
"Virtualenv Installation, recommended for Production"
It's recommended for production.
I've followed that method. If someone does this, they may never encounter or bump into any files from the "distro packaging (specifically in Debian and Ubuntu)" .
True, and that's fine. :)
Which means they're missing out on this particular idea about the mailman wrapper. The script is small enough it can be described in the docs.
Let's try a grep inside mailman-suite-docs:
grep -r -i wrapper *
no relevant results.
They are small scripts, but describing them in the documentation is problematic because they depend on user names and file system locations, which in turn are distro- or even system-dependent. (Just as an example, some distros use www-data as the web service user, which is needed for the hyperkitty and postorius integrations, while other distros use wwwrun and even others just plain www or something else entirely.)
Providing such wrappers as part of venv or the upstream repository is hence not possible.
This said, nobody prevents you from creating such wrappers for use with your venv installation tailored to your system either, just make sure that you write them up correctly. :)
Also, as is often the way, the documentation could probably be also improved. For instance, the migration documentation says:
This, and in general all, mailman commands should be run as the Mailman user and not as root. Running some of these commands as root can create files owned by root that can’t be read by the Mailman user.
But it doesn't explicitly tell you how to do this. Naturally, as a system administrator installing, maintaining and migrating mailman instances, you should probably know how to run a command as a specific user.
su -s /bin/sh -c "mailman ..." $LIST_USER
and
su -s /bin/sh -c "$PYTHON_BINARY $PATH_TO_MANAGE_PY ..." $WWW_USER
is probably what you want to execute commands either as the mailing list or as the web user, with all these variables being pseudo-variables that you want to fill in/hardcode to fit your system correctly. Putting that in the documentation and especially educating users to not use them in a copy-and-paste manner is difficult, though. Try that and you'll probably have an influx of requests along the lines of "I don't have a variable called $LIST_USER, the command fails to execute!"
Mihai