[Mailman-Users] importing mailman list archive into google groups for business / google apps

Mark Sapiro mark at msapiro.net
Tue Oct 14 01:22:02 CEST 2014

On 10/13/2014 02:50 PM, Fabian Santiago wrote:
> Yeh it probably is. I was just curious if anyone had any tools they
> had used successfully. Ok then.

I don't know if you'll get much help from google. This forum thread
<https://productforums.google.com/forum/#!topic/apps/5LdnN7OwEy8> is
almost 5 years old and has no answer.

The only way I know is somewhat kludgey. You can set up the Google group
and add yourself only as a member and then go through the Mailman
cuumulative archive mbox for the list and remail each message with
envelope from you and envelope to your groups address.

I've not tried this for a whole archive, but it works for a few messages
and should work for more.

The messages get put in the archive with the original From:, Subject:
and Date: headers, but they are all archived as of the current date.

This python script edited as indicated will send the mail.

import mailbox
import smtplib

mb = mailbox.mbox('/path/to/mbox', Create=False)  # put actual mbox path
conn = smtplib.SMTP()
conn.connect(...)  # connect to the server that will send the mail
                   # e.g. conn.connect('example.com', 587)
conn.starttls()    # if required
conn.login(...)    # if required
                   # e.g. conn.login('user at example.com', 'password'
for msg in mb:
    conn.sendmail('you at example.com',             # your actual email
                  'your_group at googlegroups.com', # your group's address

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list