Mailman server set up

Posted on 2005-12-13 at 08:03

I run several mailing lists from the server, so I had to set up Mailman on the new server. This was a bit more involved than the other services. Here's how I did it:

  1. I used apt-get to install Fetchmail (to be used to retrieve mail from the pop server).
    apt-get install fetchmail
  2. I used apt-get to install Mailman (which also installs Postfix as a dependency).
    apt-get install mailman
  3. I moved to the newly created mailman directory.
    cd /var/lib/mailman
  4. I check and fix any install problems. You may have to run this multiple times. Do it until it tells you that all is fine.
    bin/check_perms -f
  5. I edited my apache2.conf file.
    nano –w /etc/apache2/apache2.conf
    I added this to the bottom:
    ScriptAlias /mailman/ /var/lib/mailman/cgi-bin/
    Alias /pipermail/ var/lib/mailman/archives/public/
  6. I edited my mm_cfg.py file.
    nano -w /var/lib/mailman/Mailman/mm_cfg.py
    I added this to the bottom:
    MTA = 'Postfix'
    I changed the values of the following two settings:
    DEFAULT_EMAIL_HOST = 'digitalelite.com'
    DEFAULT_URL_HOST = '68.106.156.239'
  7. I ran the genaliases script.
    /var/lib/mailman/bin/genaliases
  8. I changed the user and group owner of the generated files to 'list'
    chown list:list /var/lib/mailman/data/aliases*
  9. I edited the /etc/postfix/main.cf file to look like this:
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/lib/postfix
    mail_owner = postfix
    unknown_local_recipient_reject_code = 550
    debugger_command =
        PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
        xxgdb $daemon_directory/$process_name $process_id & sleep 5
    sendmail_path = /usr/sbin/sendmail
    newaliases_path = /usr/bin/newaliases
    mailq_path = /usr/bin/mailq
    setgid_group = postdrop
    manpage_directory = /usr/share/man
    sample_directory = /usr/share/doc/postfix/sample
    readme_directory = /usr/share/doc/postfix/readme
    default_destination_concurrency_limit = 2
    alias_databases = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    local_destination_concurrency_limit = 2
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    home_mailbox = .maildir/
    owner_request_special = no
    recipient_delimiter = +
    inet_interfaces = localhost
    local_recipient_maps =
    mydestination = $myhostname, localhost.$mydomain
  10. I edited the fetchmailrc config file to look like this:
    #wake fetchmail daemon every 60 seconds
    set daemon 60
    #go to the mx server
    poll pop.1and1.com protocol pop3
    #get members list mail
        username [username edited out] with password [password edited out], is members;
        username [username edited out] with password [password edited out], is members-request;
        username [username edited out] with password [password edited out], is members-admin;
    #get dnd list mail
        username [username edited out] with password [password edited out], is dnd;
        username [username edited out] with password [password edited out], is dnd-request;
        username [username edited out] with password [password edited out], is dnd-admin;
    #get faithlinks list mail
        username [username edited out] with password [password edited out], is faithlinks;
        username [username edited out] with password [password edited out], is faithlinks-request;
        username [username edited out] with password [password edited out], is faithlinks-admin;
    #get bluebook list mail
        username [username edited out] with password [password edited out], is bluebook;
        username [username edited out] with password [password edited out], is bluebook-request;
        username [username edited out] with password [password edited out], is bluebook-admin;
  11. I added the main mailman list (required, even thogh I don't personally use it).
    /var/lib/mailman/bin/newlist mailman
  12. I added all the other lists.
    /var/lib/mailman/bin/newlist members
    /var/lib/mailman/bin/newlist dnd
    /var/lib/mailman/bin/newlist faithlinks
    /var/lib/mailman/bin/newlist bluebook
  13. I restarted all the appropriate services to make sure everything used the new conf files.
    /etc/init.d/postfix restart
    /etc/init.d/mailman restart
    /etc/init.d/fetchmail restart

Not as straighforward as DNS or Apache, but easy enough for me to handle. Also, I copied over the archives from the old server to the new (they go in the /var/lib/mailman/archives/private/ directory). That seems to have worked except that Mailman doesn't see to be adding new messages to the existing archives. I suspect that it's just a permissions issue. I'll know next month. When it creates the new month's archives, everything should be back on track. I have enough archives that I'm OK with a half a month of archive blackout if it means keeping all the older stuff.

Make A Comment