How do I upgrade a RHEL/CentOS Mailman package from source.
Note: If you try this and have issues, follow-up on the mailman-users@python.org list https://mail.python.org/mailman3/lists/mailman-users.python.org/.
Another article discusses RedHat's changes to Mailman to make it conformant with FHS. It includes information about where various files have been relocated to and links to a Mailman-Developers@python.org post that discusses the motivations for this and contains a patch to implement the changes. Unfortunately, the patch is against a very old base, and detailed instructions are lacking. This article is an attempt to remedy that.
The RHEL patch, updated for MM 2.1.34+ is here.
To actually do the upgrade, several steps are required.
- Download and unpack the 2.1.34+ tarball into a directory, or get it with
bzr branch lp:mailman
Download the patch.
- In the download directory, apply the patch with
patch -p0 </path/to/mailman-FHS.patch
Run ./configure. At a minimum, this will require the following options for the FHS layout:
- --with-pid-dir=/var/run/mailman/
- --with-config-dir=/etc/mailman/
- --with-lock-dir=/var/lock/mailman/
- --with-queue-dir=/var/spool/mailman/
- --with-log-dir=/var/log/mailman/
- --prefix=/usr/lib/mailman/
- --with-var-prefix=/var/lib/mailman/
- --with-username=mailman
- --with-groupname=mailman
- --with-cgi-gid=apache
- --with-mail-gid=nobody
- --libdir=/usr/lib
- --prefix=/usr/lib/mailman
- --with-var-prefix=/var/lib/mailman
- --with-config-dir=/etc/mailman
- --with-lock-dir=/var/lock/mailman
- --with-log-dir=/var/log/mailman
- --with-pid-dir=/var/run/mailman
- --with-queue-dir=/var/spool/mailman
- --with-template-dir=/etc/mailman/templates
- --with-python=/usr/bin/python2
- --with-mail-gid="mail postfix mailman nobody daemon"
- --with-cgi-id=apache
- --with-cgi-gid=apache
- --with-mailhost=localhost.localdomain
- --with-urlhost=localhost.localdomain
- --without-permcheck
--with-template-dir and --with-cgi-id are unrecognized without other RedHat patches.
--with-mail-gid requires another RedHat patch to accept more than a single value, so set it appropriately for your MTA.
- I don't recommend --without-permcheck.
The above steps should configure Mailman so that make and sudo make install will install everything in the RHEL FHS locations. Be sure to run check_perms after installing to catch any permission issues.