Mailman keeps creating "var" directories

If I run the mailman command it keeps creating “var” directories in whatever the current directory is.
Is that intentional?
thanks

Hi,
Yes, that's intentional.
The var directory setting is set to current directory by default.
You can set it to a fixed directory by modifying the var_dir setting in mailman.cfg.
Sent from my BlackBerry 10 smartphone. Original Message From: Andrew Stuart Sent: Thursday 4 December 2014 06:47 To: mailman-developers@python.org Subject: [Mailman-Developers] Mailman keeps creating "var" directories
If I run the mailman command it keeps creating “var” directories in whatever the current directory is.
Is that intentional?
thanks
Mailman-Developers mailing list Mailman-Developers@python.org https://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-developers/rajeevs1992%40gma...
Security Policy: http://wiki.list.org/x/QIA9

When I run “mailman info”, it creates a “var” directory in the current directory.
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 (venv2.7)ubuntu@server01:~$ ls blankontheme.zip mailman mailman.client postorius postorius_standalone temp venv2.7 (venv2.7)ubuntu@server01:~$ mailman info GNU Mailman 3.0.0b4+ (Carve Away The Stone) Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] config file: /etc/mailman.cfg db url: postgresql://mailman:password@localhost/mailman devmode: DISABLED REST root url: http://localhost:8001/3.0/ REST credentials: restadmin:restpass (venv2.7)ubuntu@server01:~$ ls blankontheme.zip mailman mailman.client postorius postorius_standalone temp var venv2.7 (venv2.7)ubuntu@server01:~$
On 4 Dec 2014, at 2:24 pm, rajeevs1992@gmail.com wrote:
Hi,
Yes, that's intentional.
The var directory setting is set to current directory by default.
You can set it to a fixed directory by modifying the var_dir setting in mailman.cfg.
Sent from my BlackBerry 10 smartphone.
Original Message
From: Andrew Stuart
Sent: Thursday 4 December 2014 06:47
To: mailman-developers@python.org
Subject: [Mailman-Developers] Mailman keeps creating "var" directories
If I run the mailman command it keeps creating “var” directories in whatever the current directory is.
Is that intentional?
thanks
Mailman-Developers mailing list Mailman-Developers@python.org https://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-developers/rajeevs1992%40gma...
Security Policy: http://wiki.list.org/x/QIA9

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
participants (3)
-
Abhilash Raj
-
Andrew Stuart
-
rajeevs1992@gmail.com