Technology from the trenches

GNU Mailman, Solaris, and Apache Settings

I recently installed and configured GNU Mailman on Solaris 10 and found the documentation a little lacking, so here are a few tips that you may find useful.

  • Unless you really, really love Sendmail and m4, I highly recommend installing Postfix instead. It’s configuration is much easier. Blastwave provides a very easy way to install and maintain open source software on Solaris, including Postfix.
  • A quick, easy and configurable way to get Mailman up and running is to use Dax Kelson’s python script, postfix-to-mailman.py. Skip the Postfix instructions that come with Mailman. Put the postfix-to-mailman script in your ~mailman directory (or wherever you wish), and open it with your favorite text editor. Change a few things at the top of the file according to your site:

    #!/usr/bin/env /opt/csw/bin/python
    #
    # Configuration variables - Change these for your site.
    MailmanHome = "/opt/mailman"; # Mailman home directory.
    MailmanData = "/var/mailman"; # Mailman data directory.
    MailmanOwner = "postmaster@netmojo.ca"; # Postmaster and abuse mail recipient.

    Follow the installation instructions in that file as well, making sure to substitute the default values with correct information for your own site. You might also want to modify the bounce message at the bottom of the file, in the def bounce() function. The URL in the message defaults to http://[the name of your list domain].

  • The webserver instructions for GNU Mailman need some improvement. Here’s the Apache (2.x) config that I used:
    # Apache configuration directives for GNU Mailman
    ScriptAlias /mailman/   /opt/mailman/cgi-bin/
    <Directory "/opt/mailman/cgi-bin/">
            AllowOverride None
            Options ExecCGI
            Order allow,deny
            Allow from all
    </Directory>
    #
    # Point to the Pipermail public mailing list archives.
    Alias   /pipermail/     /var/mailman/archives/public/
    #
    <Directory "/var/mailman/archives/public/">
            AllowOverride None
            Options Indexes MultiViews FollowSymlinks
            IndexOptions FancyIndexing NameWidth=* DescriptionWidth=* XHTML
            AddDefaultCharset Off
            Order allow,deny
            Allow from all
    </Directory>
    #
    # Fix missing index file issue
    RedirectMatch ^/mailman[/]*$ https://www.netmojo.ca/mailman/listinfo
    #

    After adding that to your apache config, run ‘apachectl configtest’ to make sure everything is OK, then restart your webserver process (i.e. svcadm restart cswapache2).

  • Follow the site configuration instructions: edit the $prefix/Mailman/mm_cfg.py file, and not the Defaults.py file, which will get over-written the next time you upgrade Mailman.
  • Step 8 of the instructions is straightforward. Be sure to edit the data/sitelist.cfg file to set further defaults for your mail lists, and then apply it to the “mailman” list if you choose. All of this is configurable in the web interface too, at: http://www.yoursite.ca/mailman/admin/mailman.
  • The instructions for setting up crontab don’t really work for Solaris 10. I configured the “mailman” user with a shell of /bin/false, so before switching to that user to install the crontab, I ran /usr/ucb/vipw to change the shell to /bin/sh. Then as root user, su - mailman ; cd /opt/mailman/cron ; crontab crontab.in. Then run vipw again to change the shell back to /bin/false.
  • Start the mailman server processes as described, then copy the startup script to init.d:

    cp /opt/mailman/scripts/mailman /etc/init.d
    cd /etc/rc3.d
    ln -s ../init.d/mailman S98mailman

  • Don’t forget the last step: creating passwords.

Tags: , , , ,

Leave a Reply