Mailman Quickstart for RedHat

by Marion Bates <mbates at whoopis.com>

Note: Tested on RH 9 using Mailman version 2.1.1-5, installed from RPM.

  1. Install:
    (sudo) rpm -Uvh mailman-version.rpm
    
  2. Edit /var/mailman/Mailman/mm_cfg.py and fix these lines:
    DEFAULT_URL_HOST   = 'www.domain.com'
    DEFAULT_EMAIL_HOST = 'domain.com'
    
  3. Edit /etc/httpd/conf.d/mailman.conf and uncomment/fix this line:
    RedirectMatch /mailman[/]*$ http://www.domain.com/mailman/listinfo
    
    Then restart httpd.

  4. cd /var/mailman/bin and run "mmsitepass" to set the Mailman site password.

  5. Create a "site-wide" mailing list. This is the one that password reminders will appear to come from. It needs to be called "mailman."
    cd /var/mailman/
    ./newlist
    
    Follow the prompts. NOTE: When it asks for admin "name", enter an email address, or it'll fail. Ignore the /etc/aliases line that it spews out at you, you don't care about messages being sent TO the "mailman" list. (Right?)

  6. (sudo) /etc/init.d/mailman start

  7. Now create your real mailing list(s) via the web interface. It will tell you to paste some lines into /etc/aliases, like this:
    mymailinglist:              "|/var/mailman/mail/mailman post mymailinglist"
    mymailinglist-admin:        "|/var/mailman/mail/mailman admin mymailinglist"
    mymailinglist-bounces:      "|/var/mailman/mail/mailman bounces mymailinglist"
    mymailinglist-confirm:      "|/var/mailman/mail/mailman confirm mymailinglist"
    mymailinglist-join:         "|/var/mailman/mail/mailman join mymailinglist"
    mymailinglist-leave:        "|/var/mailman/mail/mailman leave mymailinglist"
    mymailinglist-owner:        "|/var/mailman/mail/mailman owner mymailinglist"
    mymailinglist-request:      "|/var/mailman/mail/mailman request mymailinglist"
    mymailinglist-subscribe:    "|/var/mailman/mail/mailman subscribe mymailinglist"
    mymailinglist-unsubscribe:  "|/var/mailman/mail/mailman unsubscribe mymailinglist"
    
    Then run the "newaliases" command. Also, make sure that the installation of Mailman already put in two similar lines (add them if not):
    # Basic system aliases -- these MUST be present.
    mailer-daemon:  postmaster
    postmaster:     root
    
  8. If you're using /etc/mail/virtusertable and you want to have a catchall/wildcard address, add entries like this to virtusertable:
    # mailman aliases
    mailman@domain.com				mailman
    mailman-owner@domain.com 			mailman-owner
    mymailinglist@domain.com			mymailinglist
    mymailinglist-admin@domain.com			mymailinglist-admin
    mymailinglist-bounces@domain.com		mymailinglist-bounces
    mymailinglist-confirm@domain.com		mymailinglist-confirm
    mymailinglist-join@domain.com			mymailinglist-join
    mymailinglist-leave@domain.com			mymailinglist-leave
    mymailinglist-owner@domain.com			mymailinglist-owner
    mymailinglist-request@domain.com		mymailinglist-request
    mymailinglist-subscribe@domain.com		mymailinglist-subscribe
    mymailinglist-unsubscribe@domain.com		mymailinglist-unsubscribe
    
    Restart sendmail.

    Explanation: Because virtusertable is parsed before aliases, these lines in virtusertable hand off matches to aliases which in turn pipes them to the appropriate Mailman processors. This way you can still have a wildcard address in your virtusertable file, after the Mailman meta-aliases.


Another badly-documented task. To delete specific messages from your list archives, do the following:

cd /var/mailman/archives/private  # public archs are just symlinked to private
rm -rf mailinglist
cd /var/mailman/archives/private/goosepondchat.mbox
edit goosepondchat.mbox, delete the lines containing the messages you want gone
cd /var/mailman/bin
run ./arch mailinglist
The last command shown here will regenerate the database and html so that the rest of the archived messages are restored and viewable.

To delete or remove a list entirely:

cd /var/mailman/bin
sudo ./rmlist -a listname
(then delete the relevant entries from /etc/aliases and /etc/mail/virtusertable, if necessary)


References: