Re: [Mailman-Developers] Mailman keeps creating "var" directories

Hi Abhilash,
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.
thanks
On 6 Dec 2014, at 6:31 pm, Abhilash Raj <raj.abhilash1@gmail.com> wrote:
Hi Andrew,
On Sat, Dec 6, 2014 at 12:04 PM, Andrew Stuart <andrew.stuart@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@server01:~$ ls blankontheme.zip mailman mailman.client postorius postorius_standalone temp venv2.7 (venv2.7)ubuntu@server01:~$ grep _dir /etc/mailman.cfg #var_dir: var 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:
[paths.dev]
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:
[mailman]
layout: local
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
.
thanks, Abhilash Raj

Hi Andrew,
On Sun, Dec 7, 2014 at 2:38 AM, Andrew Stuart < andrew.stuart@supercoders.com.au> wrote:
Its not like your configuration at /etc/mailman.cfg is not used at all, its
like mailman since cannot read your settings uses its own default ones. Is
that not clean and sane enough?
And coming to your problem, since mailman is still in development the
default layout is dev
which helps developers as var
directory is stored
right in front of them. Once it is
packaged and released for production you can expect some default whose
behavior is different, and there are already many options that I mentioned
before.
That may be because of the lack of explicit documentation for production. I hope once that comes up it will be clearer for newbies and also for others as well.
thanks, Abhilash Raj

Hi Andrew,
On Sun, Dec 7, 2014 at 2:38 AM, Andrew Stuart < andrew.stuart@supercoders.com.au> wrote:
Its not like your configuration at /etc/mailman.cfg is not used at all, its
like mailman since cannot read your settings uses its own default ones. Is
that not clean and sane enough?
And coming to your problem, since mailman is still in development the
default layout is dev
which helps developers as var
directory is stored
right in front of them. Once it is
packaged and released for production you can expect some default whose
behavior is different, and there are already many options that I mentioned
before.
That may be because of the lack of explicit documentation for production. I hope once that comes up it will be clearer for newbies and also for others as well.
thanks, Abhilash Raj
participants (2)
-
Abhilash Raj
-
Andrew Stuart