[Python-bugs-list] [ python-Bugs-537484 ] SMTPLib sendmail fails on hyphenated adr

noreply@sourceforge.net noreply@sourceforge.net
Mon, 15 Apr 2002 10:14:39 -0700


Bugs item #537484, was opened at 2002-03-31 14:57
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=537484&group_id=5470

Category: Python Library
Group: Python 2.1.1
>Status: Pending
Resolution: None
Priority: 5
Submitted By: Bill Anderson (shadowlore)
Assigned to: Barry Warsaw (bwarsaw)
Summary: SMTPLib sendmail fails on hyphenated adr

Initial Comment:
When using smtplib's SMTP.sendmail, if the To: address
contains a hyphen, the To: header will be silently dropped.

To duplicate:

Follow the docstring for smtplib.SMTP.sendmail, and use
a hyphenated email address, such as foo-help@somewhere.org






----------------------------------------------------------------------

>Comment By: Barry Warsaw (bwarsaw)
Date: 2002-04-15 13:14

Message:
Logged In: YES 
user_id=12800

I'm moving this status to Pending; waiting on a response
from the submitter.

----------------------------------------------------------------------

Comment By: Barry Warsaw (bwarsaw)
Date: 2002-04-01 00:35

Message:
Logged In: YES 
user_id=12800

I don't believe it.  I use smtplib all the time to send
messages to Mailman addresses that contain hyphens and I've
never seen a problem, going back to Python 1.5.2 and up to
Python 2.3(cvs).

Note that as far as the SMTP protocol is concerned, and
smtplib as well, the body of the message which contains the
To: header, really isn't part of the SMTP dialog.  The
envelope sender and recipients are the important determining
factors in where the message goes and where the message
comes from.  These are the first two arguments to
.sendmail().  The body of the message -- including the
headers -- is spit right out to the SMTP server, after
canonicalizing stuff like line endings as per the RFC.

Much more likely is that your MTA -- i.e. the thing you're
connected to (your SMTP server) -- is munging things.

If you can explain more about your environment, I might be
able to help.  You should also attach a .py file that
exactly reproduces your problem and I will test it with my MTA.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=537484&group_id=5470