New submission from Paulo Scardine <pa...@scardine.com.br>:

In smtplib there is now way to bind to an specific source address on a machine 
with multiple interfaces; also, there no way to control the source port for the 
connection.

Since 2.7, socket.create_connection accepts a source_address parameter, a 
(host, port) tuple for the socket to bind to as its source address before 
connecting. If host or port are '' or 0 respectively the OS default behavior 
will be used.

I would like to add source_ip and source_port parameters to smtplib.SMTP, 
default to '' and 0 respectively.

It is a small change with no impact over existing code. Should I submit a patch?

----------
components: Library (Lib)
messages: 129035
nosy: paulos
priority: normal
severity: normal
status: open
title: smtplib: add ability to bind to specific source IP address/port
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11281>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to