[Bug 925502] Re: VAR_PREFIX should be runtime-configurable

Mark Sapiro mark at msapiro.net
Thu Feb 2 21:23:48 CET 2012

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')

** Changed in: mailman
   Importance: Undecided => Wishlist

** Changed in: mailman
       Status: New => Invalid

** Changed in: mailman
     Assignee: (unassigned) => Mark Sapiro (msapiro)

You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.

  VAR_PREFIX should be runtime-configurable

To manage notifications about this bug go to:

More information about the Mailman-coders mailing list