Archive for July, 2006

maildir to mbox

Tuesday, July 25th, 2006 at 4:27 pm

I simply wanted to convert my maildir from KMail to a standard mbox format, e.g. to be able to import it in Apple Mail, Mail.app under OS X. However, I found only complex scripts, none worked for me and I was about to start writing my own script until I found this very easy and neat solution from Christian Zagrodnick – works perfectly:

import sys
import email
from email.Errors import BoundaryError, HeaderParseError
from mailbox import Maildir
 
maildir = sys.argv[1]
 
md = Maildir(maildir, email.message_from_file)
 
while True:
    try:
        mail = md.next()
    except (BoundaryError, HeaderParseError):
        continue
    if mail is None:
        break
    print mail.as_string(True)

Call it via (“python scriptname.py pathToMailDirFolder > file.mbox“) and enjoy!

Thanks to Christian Zagrodnick who made this simple script available at:
http://www.gocept.com/Members/zagy/maildir2mbox/view?searchterm=maildir

by Markus

Birthday BBQ

Sunday, July 9th, 2006 at 1:01 pm
* WPG2 Plugin Not Validated *

We had a wonderful BBQ yesterday … it was my birthday and sort of a house warming as well :)

Thanks all for coming – it was great to have you here!

Recall some nice and funny impressions in my gallery if you like. Please let me know if you feel offended by any of these pictures, so I’ll remove it. Personally I think they are all great :)

CU around, all the best, Markus!

Posted in Everyday life
by markus