[Zope] Re: importing mail archives to Mailboxer

Maik Jablonski maik.jablonski at uni-bielefeld.de
Tue Apr 6 03:44:48 EDT 2004


chris h wrote:

> Greetings;
> 
> Installed mailboxer and it tests well. The next step is to move a number
> of mail archives into the 'boxer' Googling has turned up very little
> information about this limited to a discussion on imeme and a reference to
> a script on ActiveState.
> 
> Was wondering if anyone has any references to review or read up on,as I
> honestly don't have a clue on how to get this done (as python skills are
> week) ie: importing an mbox archive >zope

Hi,

use this howto an activestate for reading an mbox with Python.

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/157437

But instead of writing the mail to a new file, submit it to MailBoxer. Have
a look into the smtp2zope.py how to submit a mail via urllib to MailBoxer.

Just another solution: Use the script mentioned above which writes an mbox
to single files. Use a bash-script to iterate over these files and call
smtp2zope.py via cmdline to submit the mails to MailBoxer. This way we've
migrated several thousand mails for German Zope User Group (www.dzug.org)
from an old Yahoo-Group. We used a little script to convert the mails to
plaintext etc., maybe this is useful for you:

http://www.dzug.org/Members/mschopen/howto/migration/migration/convert.py

Maybe this is going to be the first lesson in programming Python. Try it,
it's easier than you think... and afterwards you can do things which you
never thought of :)

Cheers, Maik





More information about the Zope mailing list