[Mailman-Developers] mailman setup

Simone Piunno pioppo at ferrara.linux.it
Thu Jan 22 18:03:53 EST 2004


On Thursday 22 January 2004 21:51, Guillaume Rousse wrote:

> I didn't received any answer to my post. Does this means this kind of
> problem is considered secondary for developpers ?

Hi Guillame, 

sorry for the late answer, here are my comments.
Please note that I think none of the suggested changes should make it in the 
standard Mailman tree, at least until 3.0.  Instead, they should be diffs in 
your src.rpm, or on-the-fly patches performed by the spec.

On Monday 29 December 2003 16:50, Guillaume Rousse wrote:

> Then i move logs from /var/lib/mailman/logs to /var/log/mailman through a
> symlink.

You can define LOG_DIR in mm_cfg.py (or overwrite the value in Defaults.py)

> The config file location, however, is still puzzling me. Having a
> configuration file (mm_cfg.py) under /usr is non-standard, as /usr is
> supposed to be read-only. Moreover, it is a pain for us packagers, as we
> have to include everything but this file as normal files, then tag it as
> config file. I'd really think it should be moved in /etc instead, either by
> me using a symlink, but much better by an upstream change.

I'd do the following:

1. after "from Defaults import *" and maybe the LOG_DIR override, add this
    code to the standard mm_cfg.py (without moving it out of the tree!)

   try:
      execfile('/etc/mailman.conf')
   except SyntaxError:
      # I don't know how to write better info, like the offending line number.
      print "Syntax error in the config file!"
      import sys
      sys.exit(1)
   except IOError, e:
      import errno
      errcode, errdesc = e
      if errcode != errno.ENOENT:
         # this shouldn't happen
         raise

2. put your config in /etc/mailman.conf.
    You can use Defaults.py as a template (commenting everything)

3. document in detail whatever you've done, because all information that 
people can google only mentions mm_cfg.py.  People will be confused.

> The second issue are perms. The default install make everything owned by
> the uid/gid determined at configure stage (mail/mail for me), and make all
> directories setgid, even for non-variables files, which is quite really a
> non-standard practice. So i tried to clean it a bit.
>
> I made everything under /usr/lib/mailman owned by root.root, with standard
> perms (644 for files, 755 for directories) except the binaries
> in /usr/lib/mailman/cgi-bin and usr/lib/mailman/mail which are setgid, and
> owned by mail group. I tested, it seems to work.

it's OK, as long as you pack in you rpm the .pyc files too.
Also note that a possible different choice could be to install the Mailman 
directory (the one with mm_cfg.py) in /usr/list/pythonXXX/site-packages, so 
that 3rd party apps can use it as a library.
In this case you should better split in two packages: library and app.

And note the check_perms script... 
you should either patch it or remove it from the package.

> I also made top-level directory for variable files (/var/lib/mailman) owned
> by root/root with standard 755 perms, but i didn't tried yet further perm
> modifications there, as mailman need write permissions in subdirectories.

I believe all the /var/lib/mailman should be sgid.  

the most challenge will be for bin scripts and the like... note the paths.py 
common include.... it must be in the same directory, or you'll have to copy 
the relevant paths on top of all scripts.

Cheers
  Simone




More information about the Mailman-Developers mailing list