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.

classification
Title: Add smtplib support for SMTP AUTH LOGIN
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: ghaering, loewis, nnorwitz, paul.moore
Priority: normal Keywords: patch

Created on 2002-09-24 09:48 by paul.moore, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
smtplib.diff paul.moore, 2002-09-24 09:48 Patch to smtplib.py
Messages (7)
msg41219 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2002-09-24 09:48
Adds support for SMTP AUTH logins using the LOGIN 
protocol (in addition to currently supported PLAIN and 
CRAM-MD5 options). This is added as a "last resort" 
option after the other two, so no change should be 
visible against servers supporting either of the two 
currently supported methods.

This patch has been tested against a Microsoft 
Windows 2000 SMTP server (which supports LOGIN, 
but not either of the other two options).

The patch also includes a small change to handle MS 
SMTP server (broken???) behaviour in sending a line 
AUTH=xxxx line in response to EHLO in addition to the 
standard AUTH protocol protocol ... This change simply 
changes the feature match regular expression to ignore 
feature names followed by anything other than space or 
end of line. Alternative approaches could involve 
specifically trapping repeated features, and ignoring the 
second and subsequent occurrences, or somehow 
combining the repeated occurrences. I don't believe that 
this adds anything over the simple approach taken in the 
patch.
msg41220 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-09-24 16:16
Logged In: YES 
user_id=21627

This appears to be a duplicate of #572031. Can you please
study #572031, and comment whether your patch has features
that the other patch is lacking?
msg41221 - (view) Author: Gerhard Häring (ghaering) * (Python committer) Date: 2002-09-24 18:23
Logged In: YES 
user_id=163326

This part of your code is broken:
(code, resp) = self.docmd(base64.encodestring(password)[:-1])

That's what you get from copy & pasting mine *cough* ;-)

For why it's wrong see this patch:
http://python.org/sf/552605 which I integrated my patch
Martin mentioned and for which I did a Python 2.2 backport,
too. I'd also kindly ask to check it out at
http://python.org/sf/572031 Tested it myself against MS
Exchange, Postfix and qmail so far.
msg41222 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2002-09-25 09:45
Logged In: YES 
user_id=113328

Looks like http://python.org/sf/572031 is a far more thorough 
approach. I'm happy to close this patch in favour of that one.

I've set the status to "Closed" and resolution to "duplicate".

BTW, was there a way I could have found the duplicate? I 
didn't notice it in the browse list, and I couldn't see a "search" 
facility in the patch tracker...
msg41223 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2002-09-25 09:46
Logged In: YES 
user_id=113328

Looks like http://python.org/sf/572031 is a far more thorough 
approach. I'm happy to close this patch in favour of that one.

I've set the status to "Closed" and resolution to "duplicate".

BTW, was there a way I could have found the duplicate? I 
didn't notice it in the browse list, and I couldn't see a "search" 
facility in the patch tracker...
msg41224 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-09-25 12:12
Logged In: YES 
user_id=33168

In the upper LEFT corner of the page, there is a search
area.  This area is below your login information.
msg41225 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-09-25 12:15
Logged In: YES 
user_id=21627

There should be a search box in the left column, which
should have Patches preselected. Searching for SMTP LOGIN
brings up the other patch, and a few more.
History
Date User Action Args
2022-04-10 16:05:42adminsetgithub: 37211
2002-09-24 09:48:03paul.moorecreate