[Mailman-Developers] Mailman keeps creating "var" directories
andrew.stuart at supercoders.com.au
Sat Dec 6 22:08:16 CET 2014
I very much like the capability of mailman to create its own “var” directory structure - most open source systems require me to spend hours with strace trying to work out what directories and permission an application needs in what location - I’m heartily sick of having my time wasted like that so this is very refreshing functionality.
On the other hand it’s very confusing when a misconfiguration in the mailman.cfg results in a “var” directory being created in the current directory **which then gets picked up and used as the configuration**, so correcting your configuration in /etc/mailman.cfg then leads to a new problem, which is that your /etc/mailman.cfg is no longer being used *at all*.
I love the creation of the var directories by mailman but it feels like a bit of a hand grenade with a short fuse. Whilst I was setting up my configuration I ended up with var directories all over the file system, without any understanding of why they were there. A trap for Mailman newbies.
Perhaps it’s worth considering making creation of the “var” directory structure could be the result of an explicit option rather than a default action.
On 6 Dec 2014, at 6:31 pm, Abhilash Raj <raj.abhilash1 at gmail.com> wrote:
On Sat, Dec 6, 2014 at 12:04 PM, Andrew Stuart <andrew.stuart at supercoders.com.au> wrote:
When I run “mailman info”, it creates a “var” directory in the current directory.
Yes this is the default behavior when you don't specify the paths explicitly in your mailman.cfg
You can see in the following that I have mailman.cfg in my /etc
You can also see that /etc/mailman.cfg defines locations for the various directories.
You can see that prior to running mailman info there is no “var” directory, but there is afterwards.
I’m curious to understand why it is doing this when apparently mailman is picking up the configuration file OK from /etc but ignoring its contents and then setting up a new var directory in the current directory. Any ideas welcome.
(venv2.7)ubuntu at server01:~$ ls
blankontheme.zip mailman mailman.client postorius postorius_standalone temp venv2.7
(venv2.7)ubuntu at server01:~$ grep _dir /etc/mailman.cfg
archive_dir = /home/ubuntu/mailman/var/archives
bin_dir = /home/ubuntu/venv2.7/bin
data_dir = /home/ubuntu/mailman/var/data
etc_dir = /etc
ext_dir = /home/ubuntu/mailman/var/ext
list_data_dir = /home/ubuntu/mailman/var/lists
lock_dir = /home/ubuntu/mailman/var/locks
log_dir = /home/ubuntu/mailman/var/logs
messages_dir = /home/ubuntu/mailman/var/messages
queue_dir = /home/ubuntu/mailman/var/queue
template_dir = /home/ubuntu/mailman/var/templates
var_dir = /home/ubuntu/mailman/var
Where did you get this config from? Mailman supports INI-style config only. My bet is that mailman
is able to find your config file but is not able to parse it. What actually happens is that mailman
has predefined paths for different scenarios which can be configured with layout variable in [mailman]
section inside your mailman.cfg.
The default is `dev` layout which creates the `var` directory in the current directory.
You can either change the default `var_dir` in `dev` layout, below is a sample config for that:
var_dir : <dir_of_your_choice>
or you can use some other paths defined in src/mailman/config/mailman.cfg under
[paths.local], [paths.master], [paths.fhs] and change the default layout in your mailman.cfg like this:
Also my guess is that you can create your own path structure inside your mailman.cfg and use
that layout with mailman. How to create that can be seen in `src/mailman/config/mailman.cfg`.
More information about the Mailman-Developers