summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_smtplib.py
Commit message (Collapse)AuthorAgeFilesLines
* #25446: Fix regression in smtplib's AUTH LOGIN support.R David Murray2015-11-081-58/+121
| | | | | | | | | | | | | The auth method tests simply weren't adequate because of the fact that smtpd doesn't support authentication. I borrowed some of Milan's code for that from issue #21935 and added it to the smtplib tests. Also discovered that the direct test for the 'auth' method wasn't actually testing anything and fixed it. The fix makes the new authobject mechanism work the way it is documented...the problem was that wasn't checking for a 334 return code if an initial-response was provided, which works fine for auth plain and cram-md5, but not for auth login.
* - Issue #15014: SMTP.auth() and SMTP.login() now support RFC 4954's optionalBarry Warsaw2015-07-091-9/+83
| | | | initial-response argument to the SMTP AUTH command.
* #24218: Add SMTPUTF8 support to send_message.R David Murray2015-05-171-1/+46
| | | | Reviewed by Maciej Szulik.
* #22027: Add RFC6531 support to smtplib.R David Murray2015-05-161-0/+119
| | | | Initial patch by Milan Oberkirch.
* #16914: add timestamps to smtplib debugging output via new debuglevel 2.R David Murray2015-04-161-0/+21
| | | | Patch by Gavin Chappell and Maciej Szulik.
* Merge #22215: have the smtplib 'quit' command reset the state.R David Murray2014-08-301-0/+15
|\
| * #22215: have the smtplib 'quit' command reset the state.R David Murray2014-08-301-0/+15
| | | | | | | | | | | | | | | | | | | | | | Without this reset, starttls would fail if a connect/starttls was done after a quit, because smtplib assumed the existing value of emspt_features was accurate, but it gets reset when starttls completes (and the new value does not contain the starttls capability, since tls is already started at that point). (There may be additional places where this lack of reset was an issue as well.) Patch by Milan Oberkirch.
* | Issue #21566: Make use of socket.listen() default backlog.Charles-François Natali2014-07-231-1/+1
| |
* | #15014: Add 'auth' command to implement auth mechanisms and use it in login.R David Murray2014-07-031-22/+38
| | | | | | | | Patch by Milan Oberkirch.
* | #19662: Eliminate warnings in other test modules that use smtpd.R David Murray2014-06-111-3/+5
|/ | | | Eventually these will want to convert to decode_data=False, I think.
* #17498: Defer SMTPServerDisconnected errors until the next command.R David Murray2014-04-141-0/+13
| | | | | | | | | | | | | Normally an SMTP server will return an error, and smtplib will then issue an RSET to return the connection to the known starting state. Some servers, however, disconnect after issuing certain errors. When we issue the RSET, this would result in raising an SMTPServerDisconnected error, *instead* of returning the error code the user of the library was expecting. This fix makes the internal RSET calls ignore the disconnection so that the error code is returned. The user of the library will then get the SMTPServerDisconnected error the next time they try to talk to the server. Patch by Kushal Das.
* merge with 3.3Georg Brandl2014-02-101-1/+29
|
* Issue #20549: Use specific asserts in mailbox, smtplib and poplib tests.Serhiy Storchaka2014-02-081-3/+3
|\
| * Issue #20549: Use specific asserts in mailbox, smtplib and poplib tests.Serhiy Storchaka2014-02-081-3/+3
| |
* | Closes #6683: add a test that exercises multiple authentication.Andrew Kuchling2013-11-111-0/+9
| | | | | | | | | | The SMTP server advertises four different authentication methods, and the code will try CRAM-MD5 first, which will fail, but LOGIN succeeds.
* | merge 3.3 (#19125)Benjamin Peterson2013-09-291-3/+3
|\ \ | |/
| * fix test to run and test that smtpd does support ELHO (closes #19125)Benjamin Peterson2013-09-291-3/+3
| |
* | Merge: #5713: One more test_smtplib timing fix.R David Murray2013-03-211-1/+1
|\ \ | |/
| * #5713: One more test_smtplib timing fix.R David Murray2013-03-211-1/+1
| |
* | Merge: #5712: Preemptively fix some other possible timing issues.R David Murray2013-03-211-3/+3
|\ \ | |/
| * Merge: #5712: Preemptively fix some other possible timing issues.R David Murray2013-03-211-3/+3
| |\
| | * #5712: Preemptively fix some other possible timing issues.R David Murray2013-03-211-3/+3
| | |
* | | Merge: #5713: fix timing issue in smtplib tests.R David Murray2013-03-211-0/+3
|\ \ \ | |/ /
| * | Merge: #5713: fix timing issue in smtplib tests.R David Murray2013-03-211-0/+3
| |\ \ | | |/
| | * #5713: fix timing issue in smtplib tests.R David Murray2013-03-211-0/+3
| | |
* | | Merge: #5713: Handle 421 error codes during sendmail by closing the socket.R David Murray2013-03-211-9/+65
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | This is a partial fix to the issue of servers disconnecting unexpectedly; in this case the 421 says they are disconnecting, so we close the socket and return the 421 in the appropriate error context. Original patch by Mark Sapiro, updated by Kushal Das, with additional tests by me.
| * | Merge: #5713: Handle 421 error codes during sendmail by closing the socket.R David Murray2013-03-211-9/+65
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | This is a partial fix to the issue of servers disconnecting unexpectedly; in this case the 421 says they are disconnecting, so we close the socket and return the 421 in the appropriate error context. Original patch by Mark Sapiro, updated by Kushal Das, with additional tests by me.
| | * #5713: Handle 421 error codes during sendmail by closing the socket.R David Murray2013-03-211-1/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial fix to the issue of servers disconnecting unexpectedly; in this case the 421 says they are disconnecting, so we close the socket and return the 421 in the appropriate error context. Original patch by Mark Sapiro, updated by Kushal Das, with additional tests by me.
* | | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-1/+1
| | |
* | | Issue #16717: get rid of socket.error, replace with OSErrorAndrew Svetlov2012-12-181-1/+1
| | |
* | | Cleanup: remove not needed mocks.Andrew Svetlov2012-12-171-6/+0
| | |
* | | Issue #16647: save socket error details in LMTP.connect()Andrew Svetlov2012-12-171-2/+2
|/ / | | | | | | Initial patch by Serhiy Storchaka.
* | #8739: upgrade smtpd to RFC 5321 and 1870.R David Murray2012-05-261-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | smtpd now handles EHLO and has infrastructure for extended smtp command mode. The SIZE extension is also implemented. In order to support parameters on MAIL FROM, the RFC 5322 parser from the email package is used to parse the address "token". Logging subclasses things and overrides __init__, so it was necessary to update those __init__ functions in the logging tests to make the logging tests pass. The original suggestion and patch were by Alberto Trevino. Juhana Jauhiainen added the --size argument and SIZE parameter support. Michele Orrù improved the patch and added more tests. Dan Boswell conditionalized various bits of code on whether or not we are in HELO or EHLO mode, as well as some other improvements and tests. I finalized the patch and added the address parsing.
* | Issue #14442: Add missing errno import in test_smtplib.Ross Lagerwall2012-03-291-0/+1
| |
* | Make tests faster by reaping threads only at the endAntoine Pitrou2011-08-271-4/+1
|\ \ | |/
| * Make tests faster by reaping threads only at the endAntoine Pitrou2011-08-271-4/+1
| |
* | Addressing the review comments by Antoine Pitrou for smtplib.py and ↵Senthil Kumaran2011-07-311-6/+11
| | | | | | | | test_smtplib.py. Review comments by Ezio Melotti for smtplib.rst
* | Fix closes Issue11281 - smtplib.STMP gets source_address parameter, which ↵Senthil Kumaran2011-07-301-0/+17
| | | | | | | | adds the ability to bind to specific source address on a machine with multiple interfaces. Patch by Paulo Scardine.
* | Merge #7484: no more <> around addresses in VRFY or EXPNR David Murray2011-07-191-9/+24
|\ \ | |/
| * #7484: no more <> around addresses in VRFY or EXPNR David Murray2011-07-191-9/+24
| | | | | | | | | | | | | | | | | | The RFC doesn't say that they are allowed; apparently many mailers accept them, but not postfix. Contributions to this patch were made by Felipe Cruz and Catalin Iacob. The changeset also adds additional indirect tests for quoteaddr (null address and IDNA-encoded address).
* | merge #12147: make send_message correctly handle Sender and Resent- headers.R David Murray2011-07-031-1/+110
|\ \ | |/
| * #12147: make send_message correctly handle Sender and Resent- headers.R David Murray2011-07-031-1/+110
| | | | | | | | | | Original patch by Nicolas Estibals. My tweaks to the patch were mostly style/cosmetic, and adding more tests.
* | merge #12283: Fixed regression in smtplib quoting of leading dots in DATA.R David Murray2011-06-091-0/+15
|\ \ | |/
| * #12283: Fixed regression in smtplib quoting of leading dots in DATA.R David Murray2011-06-091-0/+15
| | | | | | | | | | | | I unfortunately introduced the regression when I refactored the code, and there were no tests of quoting so it wasn't caught. Now there is one.
* | Merge: I was right, hardconding the localhost IP doesn't work in linux-vserver.R David Murray2011-05-021-6/+3
|\ \ | |/
| * I was right, hardconding the localhost IP doesn't work in linux-vserver.R David Murray2011-05-021-6/+3
| |
* | - Issue #11289: `smtp.SMTP` class becomes a context manager so it can be usedBarry Warsaw2011-03-151-2/+36
|/ | | | in a `with` statement. Contributed by Giampaolo Rodola.
* #10273: Rename assertRegexpMatches and assertRaisesRegexp to assertRegex and ↵Ezio Melotti2010-12-011-4/+4
| | | | assertRaisesRegex.
* #10321: Add support for sending binary DATA and Message objects to smtplibR. David Murray2010-11-081-0/+106
|
* string exceptions; how quaintBenjamin Peterson2010-10-311-4/+2
|