One of sites which I admin lived on hosting providers server which was powered with CPanel and I moved it on VPS few days ago. I had tar file which was CPanel’s full backup of host. Emails and website was easy to migrate from that backup because tar contained all emails on Maildir format and whole website was on one folder. Mailing list migration was more trickier because of CPanels patched version of Mailman.
I found this helpful Mailman migration article, but it was for normal Mailman setup and steps are little bit different if you are moving away from CPanel. I didn’t find too much information of CPanel’s Mailman so I wrote this small tutorial for other admins who are moving away from CPanel and have to migrate their mailing lists to standard Mailman setup.
I am using Ubuntu Lucid Lynx (10.04 LTS) for this tutorial and Mailman was installed from Ubuntu repository with aptitude. First I moved list settings and archives from CPanel backup to server. Folder named mm contains list settings and mma contains archives.
scp backup/folder/mm server:. scp backup/folder/mma server:.
After that I logged in to my server and switched as root. In CPanel mailing lists are names contains domain name for example list examplelist is named as examplelist_domain.com. Thats because all CPanel accounts share one installation. Therefore we have to rename few directories when we move them to correct place.
cp -r mm/examplelist_domain.com/ /var/lib/mailman/lists/examplelist cp -r mma/priv/examplelist_domain.com /var/lib/mailman/archives/private/examplelist cp -r mma/priv/examplelist_domain.com.mbox/ /var/lib/mailman/archives/private/examplelist.mbox
I had only private archives but if you have public archives you have to copy also content from mma/pub to /var/lib/mailman/archives/public. We have to set right permissions or otherwise admin interface won’t work
cd /var/lib/mailman/lists/ chmod 775 examplelist chown list:list lists/*
Final step before testing is setting up email aliases for mailing list. Add following content to /etc/aliases
examplelist: "|/var/lib/mailman/mail/mailman post examplelist" examplelist-admin: "|/var/lib/mailman/mail/mailman admin examplelist" examplelist-bounces: "|/var/lib/mailman/mail/mailman bounces examplelist" examplelist-confirm: "|/var/lib/mailman/mail/mailman confirm examplelist" examplelist-join: "|/var/lib/mailman/mail/mailman join examplelist" examplelist-leave: "|/var/lib/mailman/mail/mailman leave examplelist" examplelist-owner: "|/var/lib/mailman/mail/mailman owner examplelist" examplelist-request: "|/var/lib/mailman/mail/mailman request examplelist" examplelist-subscribe: "|/var/lib/mailman/mail/mailman subscribe examplelist" examplelist-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe examplelist"
Tell to Postfix about new aliases with following command
newaliases
Now you can test if your mailing list is working. Try to send email to examplelist-request@domain.com with subject help. Mailman should respond with a list of available commands. Also test your administration interface. Go with your browser to http://example.com/mailman/admin/ or what the URL is on you setup.
Congratulations, now you should have fully working mailing list which was migrated from CPanel version of Mailman to standard Mailman setup.

Comments
Thanks for this detailed post.
I’m actually trying to do the opposite i.e. migrate a Maillan list from Ubuntu to a cPanel install of Mailman.
Would you have any tips on what would be necessary to make it successful?
Thank you!
undefined