classification
Title: smtplib authentication - try all mechanisms
Type: behavior Stage: test needed
Components: Versions: Python 3.2, Python 3.1, Python 2.7, Python 2.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: ghaering Nosy List: aguynamedben, ghaering, shubes (3)
Priority: normal Keywords easy

Created on 2009-08-11 16:17 by shubes, last changed 2009-11-24 08:27 by aguynamedben.

Messages (2)
msg91478 - (view) Author: Eric Shubert (shubes) Date: 2009-08-11 16:17
The login method in smtplib.py tries only one authentication mechanism.
There are legitimate situations where cram-md5 might fail, yet plain or
login would succeed.

RFC2554 states:
  If an AUTH command fails, the client may try another authentication
  mechanism by issuing another AUTH command.

The login method should attempt all mechanisms in preferred_auths before
returning a failure. This will make the code more robust, returning a
failure only when absolutely no authentication is possible.
msg95665 - (view) Author: Ben Standefer (aguynamedben) Date: 2009-11-24 08:27
Here is one work-around.  The default smtplib.SMTP.login() doesn't work
for StrongMail out of the box.

http://www.harelmalka.com/?p=94&cpage=1
History
Date User Action Args
2009-11-24 08:27:12aguynamedbensetnosy: + aguynamedben
messages: + msg95665
2009-08-18 02:03:12r.david.murraysetpriority: normal
keywords: + easy
stage: test needed
versions: + Python 2.6, Python 3.1, Python 2.7, Python 3.2, - Python 2.4
2009-08-11 16:22:36ghaeringsetassignee: ghaering

nosy: + ghaering
2009-08-11 16:17:15shubescreate