[Python-bugs-list] rfc822.Message getaddr method bug (PR#39)

piers@cs.su.oz.au piers@cs.su.oz.au
Fri, 30 Jul 1999 01:34:26 -0400 (EDT)


Full_Name: Piers Lauder
Version: 1.5.2
OS: Solaris
Submission from: metra.ucc.usyd.edu.au (129.78.64.5)


The following mail header, when parsed by rfc822, returns an incorrect
address from the method getaddr:

        From nobody@bounces.amazon.com Thu Jul 29 18:09:07 1999
        Date: Thu, 29 Jul 1999 00:05:26 -0700
        MIME-Version: 1.0
        Content-Type: multipart/alternative; boundary=z
        Subject: A Message from Amazon.com Delivers
        From: Amazon.com <delivers-news2@amazon.com>

        >>> import rfc822
        >>> fd=open('mail/amazon.com')
        >>> M=rfc822.Message(fd, 1)
        >>> M.getaddr('From')
        ('', 'Amazon.com')

Python version is:
Python 1.5.2 (#10, May 11 1999, 15:32:03)  [GCC 2.8.1] on sunos5