This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: rfc822.Message getaddr method bug (PR#39)
Type: enhancement Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: later
Dependencies: Superseder:
Assigned To: barry Nosy List: barry, jhylton, nobody
Priority: low Keywords:

Created on 2000-07-31 21:13 by anonymous, last changed 2022-04-10 16:02 by admin. This issue is now closed.

Messages (5)
msg378 - (view) Author: Nobody/Anonymous (nobody) Date: 2000-07-31 21:13
Jitterbug-Id: 39
Submitted-By: piers@cs.su.oz.au
Date: Fri, 30 Jul 1999 01:34:24 -0400 (EDT)
Version: 1.5.2
OS: Solaris


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



====================================================================
Audit trail:
Fri Jul 30 08:25:26 1999	guido	moved from incoming to open
msg379 - (view) Author: Nobody/Anonymous (nobody) Date: 2000-08-01 21:01
From: Sjoerd Mullender <sjoerd@oratrix.nl>
Subject: Re: [Python-bugs-list] rfc822.Message getaddr method bug (PR#39)
Date: Mon, 02 Aug 1999 14:09:40 +0200

On Fri, Jul 30 1999 piers@cs.su.oz.au wrote:

> 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

It's an incorrect mail header.  The period in Amazon.com is not
allowed there but the name has to be quoted with double quotes.

But I guess rfc822.py could (and should) be lenient and let you get
away with this.

-- Sjoerd Mullender <sjoerd.mullender@oratrix.com>
msg380 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2000-09-07 22:01
Please do triage on this bug.
msg381 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2000-09-12 15:54
Barry -- you're the resident mail guy.  You might think about adding this feature post 2.0.
msg382 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2000-09-25 15:59
Sjoerd's right.  I've added this feature request to PEP 42 so we can close this bug report.
History
Date User Action Args
2022-04-10 16:02:11adminsetgithub: 32748
2000-07-31 21:13:17anonymouscreate