Bug in rfc822

phil hunt philh at comuno.freeserve.co.uk
Mon Jul 9 18:44:17 EDT 2001


On Mon, 09 Jul 2001 13:50:14 GMT, Guido van Rossum <guido at python.org> wrote:
>"Steve Holden" <sholden at holdenweb.com> writes:
>
>> "Fredrik Lundh" <fredrik at pythonware.com> wrote ...
>> > phil hunt wrote:
>> > > I have just found out that rfc822.py doesn't conform to
>> > > RFC2822.
>> >
>> > sounds like it's time to rename that module ;-)
>> >
>> It would be even better to rewrite it. rfc822 builds so many lists of
>> characters which are later returned as strings by joining the lists, a good
>> C optimization would yield huge performance benefits. Pity I'm not better at
>> C.
>
>I think Barry's mimelib may have a replacement already.
>
>    http://mimelib.sourceforge.net/

I am currently writing a program that reads emails, modifies
them in various ways (adding headers, encryption, etc) and
outputs the result.

As part of this program, I'm writing a mail module that 
(when finished) could be hacked into a replacement for rfc822. 
rfc822's functionality is to read mail headers and allow 
interrogation of their values easily. My module is conceptually
on a higher level; containing a MailHeader class which
can be used to write as well as read ascii representations
of email, and a Mail class that includes the header and the body;
again for composition as well as reading emails. (for now, it 
uses rfc822 to parse incoming headsers).

When it is written, perhaps it could be considered for 
eventual inclusion in the standard library (I say eventually, because
IMO it'll take me a few attempts to get the API exactly right)

My module doesn't know anything about Mime; which is good
because IMO there is room for a library that is higher-level
than rfc822 but lower levelb than knowing about Mime.

What is the process of getting a module in the standard library?

-- 
## Philip Hunt ## philh at comuno.freeserve.co.uk ##







More information about the Python-list mailing list