Issue1521196
Created on 2006-07-12 13:32 by ps1956, last changed 2009-03-30 05:06 by ajaksu2.
| File name |
Uploaded |
Description |
Edit |
Remove |
|
all.patch
|
ps1956,
2006-07-12 13:32
|
2.4.3 smtplib patch |
|
|
|
smtplib.patch
|
ps1956,
2007-04-04 10:31
|
updated patch against svn trunk |
|
|
|
msg50680 - (view) |
Author: Peter (ps1956) |
Date: 2006-07-12 13:32 |
|
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).
|
|
msg50681 - (view) |
Author: Stephen Hansen (aptshansen) |
Date: 2007-03-16 06:21 |
|
This seems reasonable to me; the preference of which authentication modes to use shouldn't be a hardcoded decision in smtplib, especially if one of the biggest email servers around breaks if we can't.
However, I think it needs a couple things done before it should be accepted:
#1) The code patch itself needs to be done against the trunk, as it doesn't currently apply cleanly (it's a trivial fix)
#2) The documentation patch should include mention of the "constants" of smtplib.AUTH_*
|
|
msg50682 - (view) |
Author: Peter (ps1956) |
Date: 2007-04-04 10:31 |
|
File Added: smtplib.patch
|
|
| Date |
User |
Action |
Args |
| 2009-03-30 05:06:02 | ajaksu2 | set | stage: test needed type: feature request versions:
+ Python 2.7, - Python 2.4 |
| 2006-07-12 13:32:50 | ps1956 | create | |
|