python-ntlm icon indicating copy to clipboard operation
python-ntlm copied to clipboard

SMTP Auth

Open GoogleCodeExporter opened this issue 10 years ago • 14 comments

Please include SMTP NTLM support

Original issue reported on code.google.com by [email protected] on 12 Nov 2009 at 2:04

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

I implemented this. A patch is attached. Needs the patch from issue #15 applied 
first.

Example:

from ntlm.smtp import ntlm_authenticate
import smtplib

smtp = smtplib.SMTP("my.smtp.server")
smtp.ehlo()
ntlm_authenticate(smtp, r"DOMAIN\username", "password")

Original comment by [email protected] on 8 Dec 2009 at 9:50

Attachments:

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

[deleted comment]

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

Tested patches 14 and 15, verified working for SMTP.
Did not test HTTP, but the code looks correct.

Original comment by [email protected] on 9 Jan 2010 at 1:42

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

Bernt, I have tested the patch and it works for me too. Thanks so much.

Original comment by [email protected] on 28 Jan 2010 at 12:17

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

I got #15 patched, but don't know which file to patch with ntlm.smtp.patch. Any 
help?

Original comment by [email protected] on 7 Sep 2010 at 3:36

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

w3estw00d: smtp.py is a new file.

The command:
patch < ntlm-smtp.patch

works for me.

Original comment by [email protected] on 7 Sep 2010 at 6:50

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

Done! thank u, bernt.

Original comment by [email protected] on 8 Sep 2010 at 2:54

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

works in python2.7, remind apply patch from issue #15 first.

Original comment by [email protected] on 20 Jun 2011 at 9:59

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

I can not apply #14 & #15 patches and patch cmd report some errors. It seems 
that the latest version of source code( R81) is not the correct version for 
these two patch, where can I find the correct version? I really need the NTLM 
for smtp function, any help would be aprreciated.

Original comment by [email protected] on 24 Aug 2011 at 1:49

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

I had to get the source for version 77...then it works just fine. Kind of a 
pain in the you-know-what though.

Original comment by [email protected] on 4 Jan 2012 at 4:34

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

For some reason I wasn't able to patch revision 81, so I edited files by hand 
and made new ones. Here are working patches. If you don't need IMAP support 
just skip second patch.

Original comment by [email protected] on 21 Feb 2012 at 9:05

Attachments:

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

Attached patch apply to revision 83. It is all in one patch.

Why that isn't merged yet?

Original comment by [email protected] on 12 Jun 2012 at 2:50

Attachments:

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

it's been 4 years... why hasn't this been merged yet...

Original comment by [email protected] on 30 Apr 2014 at 10:28

GoogleCodeExporter avatar Apr 07 '15 17:04 GoogleCodeExporter

FYI for future-comers I just published the following PR in the python-ntlm3 package. Link here https://github.com/trustrachel/python-ntlm3/pull/24

shadiakiki1986 avatar Apr 14 '17 08:04 shadiakiki1986