reading Unix mailbox

Alessio Pace puccio_13 at
Wed Apr 16 16:37:02 CEST 2003

Skip Montanaro wrote:

>     Alessio> I am using Python2.3 alpha and I thought there was something
>     Alessio> updated to iterate over the messages of a mailbox in mbox
>     Alessio> format, but the next() method still return a deprecated
>     RFC822 Alessio> message object reference, am I wrong? Is there a way
>     to read Alessio> mailboxes in mbox format but iterating over
>     MIMEMessages?
> Try:
>     from spambayes import mboxutils
>     mbox = mboxutils.getmbox("somefile")
>     for msg in mbox:
>         do_stuff(msg)
> Skip

But that requires to have spambayes, doesn't it?

Alessio Pace

More information about the Python-list mailing list