Archive for the ‘Mailman’ Category

As root, on the server running mailman, run:

/usr/lib/mailman/bin/list_members -f <listname>

Every five minutes or so, I’m getting an error message like this:

Traceback (most recent call last):
 File "/usr/lib/mailman/cron/gate_news", line 284, in ?
   main()
 File "/usr/lib/mailman/cron/gate_news", line 264, in main
   process_lists(lock)
 File "/usr/lib/mailman/cron/gate_news", line 194, in process_lists
   for listname in Utils.list_names():
 File "/usr/lib/mailman/Mailman/Utils.py", line 96, in list_names
   return Site.get_listnames()
 File "/usr/lib/mailman/Mailman/Site.py", line 110, in get_listnames
   for fn in os.listdir(mm_cfg.LIST_DATA_DIR):
OSError: [Errno 2] No such file or directory: '/var/lib/mailman/lists'

In /etc/cron.d/mailman,

# Every 5 mins, try to gate news to mail.  You can comment this one out
# if you don't want to allow gating, or don't have any going on right now,
# or want to exclusively use a callback strategy instead of polling.
#0,5,10,15,20,25,30,35,40,45,50,55 * * * * mailman /usr/lib/mailman/cron/gate_news

I don’t really understand what gating is and I don’t think we’re using it. So I’ve commented it out.

Our mailman server is no longer archiving messages. I checked the permissions on some files and found that many were wrong. They can be fixed with /usr/lib/mailman/bin/check_perms -f, if this command is run as root.

This still hasn’t fixed our archive issue, but it looks to get me closer.

Some of the scripts that run to check for certain conditions use sendmail to “file” a report to me. Unfortunately, on many upgraded machines, sendmail was not configured correctly, so the report never left the machine on which the script was run. Since I don’t want to log into each machine to get the reports, I have to change who gets the reports. This is done with /etc/mail/aliases. This used to be sent out from the head node to all other machines, but that no longer will work. Mailman also uses the aliases file to store its information. So, I decided to simply send out a new aliases file once, to update all machines. Then manually go to the mailman server and fix the aliases file. (Then have to run newaliases for them to take effect.) When I get some time, I’ll write a script that does this all automatically (or that uses cfengine for it, which would be even better).

In the upgrade, I missed installing the hypermail package. I installed the rpm as soon as I noticed. We probably don’t need to use this now that we’re running mailman. But, just in case, I’ve installed it anyway. It’s invoked from the crontab with:

/usr/bin/hypermail -m /var/spool/mail/theta13mail -d /web/mwtheta13/archive
/usr/bin/hypermail -m /var/spool/mail/apsmail -d /web/apsreactor/archive

Edit the file: /usr/lib/mailman/Mailman/mm_cfg.py. Basically, adding the hostname of the computer running it.

DEFAULT_URL_HOST  = 'hostname.uchicago.edu'
DEFAULT_EMAIL_HOST = 'hostname.uchicago.edu'

Since I had screwed it up previously, all my links and things were saying localhost.localdomain, instead of the above hostname. The solution was to use rpm to delete mailman, delete all the rpmsave files and reinstall. Then I just edited the above file and /etc/httpd/conf.d/mailman.conf. That took care of it. Next, I set the site password with mmsitepass and started the mailman service. Lastly, copied the files from /var/lib/mailman to /web/hep/mailman, made the link “ln -s /web/hep/mailman /var/lib/mailman” and changed the permissions on /web/hep/mailman to:

drwxrwsr-x root mailman mailman/

To add a new list, run /usr/lib/mailman/bin/newlist and follow the prompts. The last step is to add the following lines to /etc/mail/aliases and run newaliases. Note that test needs to be changed to the new list name.

test:              "|/usr/lib/mailman/mail/mailman post test"
test-admin:        "|/usr/lib/mailman/mail/mailman admin test"
test-bounces:      "|/usr/lib/mailman/mail/mailman bounces test"
test-confirm:      "|/usr/lib/mailman/mail/mailman confirm test"
test-join:         "|/usr/lib/mailman/mail/mailman join test"
test-leave:        "|/usr/lib/mailman/mail/mailman leave test"
test-owner:        "|/usr/lib/mailman/mail/mailman owner test"
test-request:      "|/usr/lib/mailman/mail/mailman request test"
test-subscribe:    "|/usr/lib/mailman/mail/mailman subscribe test"
test-unsubscribe:  "|/usr/lib/mailman/mail/mailman unsubscribe test"

Files are in /usr/lib/mailman. Edit the file, /usr/lib/mailman/Mailman/mm_cfg.py. Originally, I put our fqdn of the host in DEFAULT_URL_HOST and DEFAULT_EMAIL_HOST, but this didn’t work. After I commented out these two lines, I was able to successfully run check_perms.

It put a file in /etc/httpd/conf.d/mailman.conf that set up the aliases required for httpd. The location for the archive files is /var/lib/mailman/archives/public. I’d like this to be located on the same disk as the webpages. So, I’m just going to create a link from /var/lib/mailman to /web/hep/mailman. This will allow me to backup the archive along with all the other web files during my routine backups.

Create a site-wide list, to use for sending out password reminders.

/usr/lib/mailman/bin/newlist mailman
Enter the email of the person running the list:  me@hep
Initial mailman password:  usual one
To finish creating your mailing list, you must edit your /etc/aliases (or
equivalent) file by adding the following lines, and possibly running the 
`newaliases' program:

## mailman mailing list
mailman:                   "|/usr/lib/mailman/mail/mailman post mailman"
mailman-admin:         "|/usr/lib/mailman/mail/mailman admin mailman"
mailman-bounces:       "|/usr/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:        "|/usr/lib/mailman/mail/mailman confirm mailman"
mailman-join:              "|/usr/lib/mailman/mail/mailman join mailman"
mailman-leave:            "|/usr/lib/mailman/mail/mailman leave mailman"
mailman-owner:           "|/usr/lib/mailman/mail/mailman owner mailman"
mailman-request:          "|/usr/lib/mailman/mail/mailman request mailman"
mailman-subscribe:       "|/usr/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:    "|/usr/lib/mailman/mail/mailman unsubscribe mailman"

Hit enter to notify mailman owner...