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.

Author paulos
Recipients paulos
Date 2011-02-22.04:10:54
SpamBayes Score 4.2006016e-09
Marked as misclassified No
Message-id <1298347855.65.0.0117652407614.issue11281@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2011-02-22 04:10:55paulossetrecipients: + paulos
2011-02-22 04:10:55paulossetmessageid: <1298347855.65.0.0117652407614.issue11281@psf.upfronthosting.co.za>
2011-02-22 04:10:54pauloslinkissue11281 messages
2011-02-22 04:10:54pauloscreate