Hide Forgot
When I updated to mailman-2.1.12-17.el6.x86_64, all my lists disappeared. The first symptom was "Starting mailman: Site list is missing: mailman" while restarting after the update. Defaults.py: VAR_PREFIX = '/var/lib/mailman' mm_cfg.py: VAR_PREFIX = '/vol/lib/mailman' This was so both before and after the update. The list directories in /vol/lib/mailman still existed after the update, while /var/lib/mailman was empty. Running 'newlist mailman' created the list in /var/lib/mailman. Clearly, VAR_PREFIX was not being obeyed. I proceeded to delete mm_cfg.pyc and mm_cfg.pyo and restart mailman. The .pyc file was recompiled, but this did not fix the problem. The .pyo file was not re-created. Subsequently I edited VAR_PREFIX in Defaults.py and restarted mailman. This fixed the problem and all the lists are back. Obviously, something somewhere that should be reading VAR_PREFIX from mm_cfg isn't doing so. Interestingly though, the other non-default settings in mm_cfg are obeyed. Ownerships and permissions are good and selinux is off. I tried to find the real cause of the problem, but have failed so far.
Aha, found it. Defaults.py actually says # Nothing below here is user configurable. Most of these values are in this # file for internal system convenience. Don't change any of them or override # any of them in your mm_cfg.py file! just before VAR_PREFIX is set. So I have to assume that I had previously edited Defaults.py and that the file was overwritten by the update. As it should be. Hence, this is not a bug but a feature request: VAR_PREFIX should be configurable. Closing here and filing upstream instead.
This is now tracked at https://bugs.launchpad.net/mailman/+bug/925502 . Mark Sapiro left a solution/instruction there, which I'm copying here for the next man's convenience: == VAR_PREFIX is configurable in mm_cfg.py. The problem is that 22 other directories/files are defined directly or indirectly in Defaults.py following the definition of VAR_PREFIX. mm_cfg.py imports everything from Defaults and then allows you to override any of the imported values. Simply changing VAR_PREFIX in mm_cfg.py doesn't change the definitions of these other 22 variables already defined in Defaults.py. If you redefine VAR_PREFIX in mm_cfg .py, you need to copy all the dependent definitions after that as follows: VAR_PREFIX = 'new/value' LIST_DATA_DIR = os.path.join(VAR_PREFIX, 'lists') LOG_DIR = os.path.join(VAR_PREFIX, 'logs') LOCK_DIR = os.path.join(VAR_PREFIX, 'locks') DATA_DIR = os.path.join(VAR_PREFIX, 'data') SPAM_DIR = os.path.join(VAR_PREFIX, 'spam') PUBLIC_ARCHIVE_FILE_DIR = os.path.join(VAR_PREFIX, 'archives', 'public') PRIVATE_ARCHIVE_FILE_DIR = os.path.join(VAR_PREFIX, 'archives', 'private') QUEUE_DIR = os.path.join(VAR_PREFIX, 'qfiles') INQUEUE_DIR = os.path.join(QUEUE_DIR, 'in') OUTQUEUE_DIR = os.path.join(QUEUE_DIR, 'out') CMDQUEUE_DIR = os.path.join(QUEUE_DIR, 'commands') BOUNCEQUEUE_DIR = os.path.join(QUEUE_DIR, 'bounces') NEWSQUEUE_DIR = os.path.join(QUEUE_DIR, 'news') ARCHQUEUE_DIR = os.path.join(QUEUE_DIR, 'archive') SHUNTQUEUE_DIR = os.path.join(QUEUE_DIR, 'shunt') VIRGINQUEUE_DIR = os.path.join(QUEUE_DIR, 'virgin') BADQUEUE_DIR = os.path.join(QUEUE_DIR, 'bad') RETRYQUEUE_DIR = os.path.join(QUEUE_DIR, 'retry') MAILDIR_DIR = os.path.join(QUEUE_DIR, 'maildir') PIDFILE = os.path.join(DATA_DIR, 'master-qrunner.pid') SITE_PW_FILE = os.path.join(DATA_DIR, 'adm.pw') LISTCREATOR_PW_FILE = os.path.join(DATA_DIR, 'creator.pw')
I don't think it's easy to change the VAR_DIRECTORY easily. Changing it in Defaults.py has never been supported, because it's not config file, but contains default variables. In mm_cfg.py it's not easy to change it (unless you do what Mark suggests). With the way how config parsing works in Mailman (using the Python), it's not possible to change it significantly to improve the current situation. What you could probably do is to create symlink '/var/lib/mailman' pointing to '/vol/lib/mailman', but I haven't tested whether it actually works.