Skip to content

MigrationToGoogleGroups

Waldir Pimenta edited this page Jul 5, 2013 · 5 revisions

written in 2009, may be outdated

How to move a mailing list from SourceForge to Google Groups

Set up Google Groups as as a remote archive for your mailing list

Create Google Group and in ''Advanced'' settings check: [*] This group is hosted on another mailing list host

Download a backup of SourceForge list from https://lists.sourceforge.net/mbox/LISTNAME (you'll be prompted for your SF credentials). If you need more information, there's [documentation available](https://sourceforge.net/apps/trac/sourceforge/wiki/Mailing list archive backups %28mbox files%29).

There is no import facility in Google Groups. Recently (in 2009) all wxWidgets lists were moved to Google Groups, so I asked Robin Dunn, who managed the transition, for the script he used. He sent me this script and wrote:

Here it is. It essentially remails every message in an mbox file to the google group's address using all the original headers, etc. To use it you need to temporarily change the group's settings, turning on the "This group is hosted on another mailing list host" option. You then tell this script to mail the messages to the "Subscribe the following address..." address shown in the advanced options page.

The messages are loaded into the archive in the order that they arrive and are processed by google, rather than by the date and time of the message. So you want to take care that you don't flood your outgoing mail queue or google's incoming queue as that can cause the messages to be processed out of order. The script gives you some options to control how often chunks of N messages are sent, how big N is, etc.

The script worked fine. The only problems was that mailbox.mbox() used in the script doesn't like 'From ' lines in message bodies, which are not escaped in the backup file from SF. That's because there are different mbox formats, see what's in Python docs about this issue. I modified the mbox file manually.

You can either use you SMTP server, or send the message directly to the google groups SMTP, which can be found using dig:

$ dig mx googlegroups.com

I used directly googlegroups SMTP. The server accepted my mails, although I wasn't fully trusted:

Received-SPF: softfail (google.com: best guess record for domain of transitioning fityk-devel-migration@localdomain does not designate 89.77.210.202 as permitted sender) client-ip=89.77.210.202;

Authentication-Results: gmr-mx.google.com; spf=softfail (google.com: best guess record for domain of transitioning fityk-devel-migration@localdomain does not designate 89.77.210.202 as permitted sender) smtp.mail=fityk-devel-migration@localdomain

Perhaps that's why sending emails was so slow -- about 10 seconds per email.

It's easy to add TSL support to the script, just put:

smtp.ehlo(); smtp.starttls(); smtp.ehlo(); smtp.login(fromAddress, smtpPassword)

before smtp.sendmail().

But do not try using GMail SMTP, because it changes the From: field of the incoming e-mails.

Now you can subscribe the address used for importing archives to SF mailing list, and your archiving facility is set.

Move members and use the new list

The list of subscribers of a SourceForge mailing list can be obtained from https://sourceforge.net/p/PROJECT/admin/mailman/LISTNAME/subscribers/display. Additionally, the Mailman FAQ 3.62. How do I extract a list of my list's members (subscribers)? describes a few methods to export the list of members.

To prevent spam, Google Groups limit the number of members that can be mass-subscribed. But you can send invitations to any number of users to allow them to easily subscribe.

The rest of the migration process is just changing setting of the google group and disabling the old mailing list.