[issue3461] smtplib does not fully support IPv6 in EHLO

Derek Morr report at bugs.python.org
Tue Jul 29 00:08:45 CEST 2008


New submission from Derek Morr <derekmorr at psu.edu>:

On an IPv6-only machine, smtplib does not send an IPv6 address in the 
EHLO. It sends "EHLO [0.0.0.0]" instead. For example, on a v6-only 
network with stateless autoconfiguration enabled (a common 
configuration), smtplib will show this error.

Further, SMTP's __init__() method tries to determine the value of EHLO 
parameter before the socket is established. But it can't know what 
value to use before the socket is setup (e.g., should it use a 
hostname, a v4 address literal, or a v6 address literal).

The attached patch moves the self.local_hostname processing into the 
connect() method, and updates it to use IPv6-aware resolver interfaces.

----------
components: Library (Lib)
files: python_smtplib.patch
keywords: patch
messages: 70372
nosy: dmorr
severity: normal
status: open
title: smtplib does not fully support IPv6 in EHLO
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file11000/python_smtplib.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3461>
_______________________________________


More information about the Python-bugs-list mailing list