By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,171 Members | 776 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,171 IT Pros & Developers. It's quick & easy.

Re: potential bug in UnixMailbox method of Python

P: n/a
Sirshendu Rakshit wrote:
Hi,

I am using UnixMailbox to parse an mbox file. This mbox file starts with
the following lines.

From qt***********@quicktopic.com Tue May 18 01:43:12 2004
>>From qt***********@quicktopic.com Tue May 18 01:43:12 2004
Return-Path: <qt***********@quicktopic.com>
X-Original-To: jm@localhost
Delivered-To: jm@localhost.jmason.org
....
...

Now what I am seeing is that the '>From qt***********@quicktopic.com
Tue May 18 01:43:12 2004' line is being returned as mail header by
UnixMailbox.
Which is not the case. I am not sure whether this is a bug in
UnixMailbox. Or is it not handled in Active Python 2.3.5.

The http://www.qmail.org/man/man5/mbox.html
link says that while reading a mbox the >From_line should be stripped off.

Please help me out.
I believe the difference between UnixMailbox and other types is that the
UnixMailbox is specifically designed to identify the gaps between
messages by the blank line and the "From ....". While this isn't
technically RFC 2822 format, it's useful to have the header. If you
don't want it you can always throw it away ...

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Nov 13 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.