reading Unix mailbox

Steve Holden sholden at
Wed Apr 16 15:43:21 CEST 2003

"Alessio Pace" <puccio_13 at> wrote in message
news:hZbna.17434$DN.480144 at
> Hi all,
> I am using Python2.3 alpha and I thought there was something updated to
> iterate over the messages of a mailbox in mbox format, but the next()
> method still return a deprecated RFC822  message object reference, am I
> wrong? Is there a way to read mailboxes in mbox format but iterating over
> MIMEMessages?
> Thanks to all who can help me

I seem to rememeber that a recent version (probably 2.2) modified the
mailbox objects so you could provide an optional (callable) factory argument
when creating them, and this would then be called when the mailbox instance
needed to create a message. The default is rfc822.Message, hence the
behavior you are seeing.

Does this help any?

Steve Holden                        
How lucky am I?
Python Web Programming       

More information about the Python-list mailing list