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 ps1956
Recipients
Date 2006-07-12.13:32:50
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Sending email to AOL's smtp server fails with "501
INVALID SASL FORMAT OR LENGTH".

This patch allows the default order (AUTH_CRAM_MD5,
AUTH_PLAIN, AUTH_LOGIN) used to select the AUTH method
to be overridden with a new optional preferred_auths
parameter.  By changing the order so that AUTH_LOGIN
comes before AUTH_PLAIN, AOL's smtp server is happy. 
This patch may be useful for other stmp servers that
fail on login when using the default AUTH selection order.

Sample usage:

if aol:
    auths = [smtplib.AUTH_CRAM_MD5, smtplib.AUTH_LOGIN,
smtplib.AUTH_PLAIN]
    smtp.login(fromUser.split("@")[0], passwd, auths)
else:
    smtp.login(fromUser, passwd)

I tested the patch using python 2.4.3 on slackware 10.2
 (kernel 2.4.32).
History
Date User Action Args
2007-08-23 15:53:31adminlinkissue1521196 messages
2007-08-23 15:53:31admincreate