Majordomo to Mailman migration

Majordomo was, for the longest time, the de facto mailing list server.  For many years, it has been the king.  However, as more people have flooded on to the internet, people began to ask for more.  For a while, majordomo was expanded to handle these needs, but now there are a number of other products that do the same as what majordomo does and then some.

Mailman is a popular alternative that is entirely Python-based.  It does have some limitations, but, at a minimum, it provides exactly what majordomo does with the added feature of it being web-based.

Migrating from majordomo to Mailman can be a somewhat daunting task since there are so many pieces that are needed to be preserved between the mailing list servers.  Keep in mind that the goal is to have little or no impact to the end users.

A good step-by-step guide was found on the a href=http://mail.python.org/pipermail/mailman-users/2000-December/008322.htmlmailman mailing list/a, some of which is paraphrased here.

First and foremost, try not to disrupt the existing majordomo installation.  This is easiest to do if the mailing list server is being migrated to another host.  However, these two can, indeed, live side by side if care is taken.  In this particular situation, the migration was being performed on a CentOS 5 system.

Gather all of the information and archives from the currently active lists (we don’t care about the inactive ones):
ul
liGrab the span style=text-decoration: underline;active/span lists from the majordomo server.  These servers are typically using Sendmail as their MTA, so the *active* list names can be grabbed from here via:/li
/ul
pregrep \-owner /etc/mail/aliases | awk -F-owner: ‘{print $1:$2}’ gt; /root/majordomo_tmp/list_owners/pre
ul
liCreate the lists within Mailman and assign the correct owner to the list./li
/ul
precat /root/majordomo_tmp/list_owners | awk -F: ‘{print /usr/lib/mailman/bin/newlist -u mailman.oursite.com -e mail.oursite.com -q $1 $2 testpassword}’ | /bin/sh/pre
ul
liMerge the archives for each active list in to one ‘mbox’ formatted list.  This may not be necessary depending on how majordomo was set up.  Some installations may already have the archives in ‘mbox’ format which will save a bit of time and effort/li
/ul
pre#!/bin/sh
for i in /home/majordom/archives/lt;list namegt;/lt;list namegt;.archive.[1-9]??? \
/home/majordom/archives/lt;list namegt;/lt;list namegt;.archive.0??? ; do
cat $i gt;gt; /var/lib/mailman/archives/private/lt;list namegt;/lt;list namegt;.mbox
echo ” gt;gt;
/var/lib/mailman/archives/private/lt;list namegt;/lt;list namegt;.mbox
done
chown mailman:mailman
/var/lib/mailman/archives/private/lt;list namegt;/lt;list namegt;.mbox
chmod 664 /var/lib/mailman/archives/private/lt;list namegt;/lt;list namegt;.mbox/pre
ul
liImport the archives to the mailman mailing list.  Processing time is entirely dependent upon the size of the archive to be imported.  In the test case, it took about 2.5 hours to migrate 274 lists comprising of approximately 20Gb of list archives./li
/ul
precat /root/majordomo_tmp/list_owners | awk -F: ‘{print /usr/lib/mailman/bin/arch $1}’ | /bin/sh/pre
ul
liEdit /usr/lib/mailman/Mailman/mm_cfg.py to suit your needs.  In the test case, we used this file (a href=https://geekdom.wesmo.com/wp-content/uploads/2009/06/mm_cfgpy.txtmm_cfg.py/a) which is just a slightly modified version of the Defaults.py./li
liStart mailman via
pre/etc/init.d/mailman start/pre
/li
liUpdate Sendmail’s aliases to point to Mailman
ul
liBack up your Sendmail aliases file :
precp /etc/mail/aliases /etc/mail/aliases.bak/pre
/li
liRemove all of the mailing list information from your Sendmail aliases file./li
liInsert the new aliases information in to the Sendmail aliases file:
prefont style=position: absolute;overflow: hidden;height: 0;width: 0a href=http://vtsc.info/edfa/a/font/usr/lib/mailman/bin/genaliases gt;gt; /etc/mail/aliases/pre
/li
liRestart Sendmail via :
pre/etc/init.d/sendmail restart/pre
/li
/ul
/li
liModify the list parameters as you see fit.  This can be done either via the command line using one of the many configuration parameters (use
pre/usr/lib/mailman/bin/config_list -o /root/mailman_tmp/configuration_template mailman/pre
to get a full breakdown of the configuration options) or via the web interface available at http://maillist.oursite.com/mailman on a per-list basis.  From the command line, obviously, you can get fancy.  For example, we wanted all of the lists to be publically available:
pre/usr/lib/mailman/bin/list_lists -b | awk ‘{print echo \advertised = 1\ gt; /root/mailman_tmp/list_configs/$1}’ | /bin/sh
/usr/lib/mailman/bin/list_lists -b | awk ‘{print /usr/lib/mailman/bin/config_list -i /root/mailman_tmp/list_configs/$1 $1}’ | /bin/sh/pre
/li
li Set the site-wide administrative password via:
pre/usr/lib/mailman/bin/mmsitepass/pre
/li
li Set the site-wide list creator password (not as powerful as the administrator password) via:
pre/usr/lib/mailman/bin/mmsitepass -c/pre
/li
liNext step is to hack in LDAP support, which doesn’t look to be too easy./li
/ul

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.