Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch that adds IMAP NTLM authentication #15

Open
GoogleCodeExporter opened this issue Mar 19, 2015 · 4 comments
Open

Patch that adds IMAP NTLM authentication #15

GoogleCodeExporter opened this issue Mar 19, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

Implemented a IMAPNtlmAuthHandler class for using NTML with IMAP.

Example:

from imaplib import IMAP4
from ntlm.IMAPNtlmAuthHandler import IMAPNtlmAuthHandler

imap = IMAP4("my.imap.server")
imap.authenticate("NTLM", IMapNtlmAuthHandler(r"DOMAIN\username", "password"))

Notes:
* I moved the base64 encoding/decoding to the HTTPNtlmAuthHandler.py module
* I only did the change for 2.6, not 3.0

Original issue reported on code.google.com by [email protected] on 8 Dec 2009 at 1:32

Attachments:

@GoogleCodeExporter
Copy link
Author

Forgot to set type when submitting. Should be Type-Enhancement. Don't know how 
to
edit that. Project admin: Please edit the issue type.

Original comment by [email protected] on 8 Dec 2009 at 1:34

@GoogleCodeExporter
Copy link
Author

The patch needs a patch...

Forgot an import in HTTPNtlmAuthHandler.py:

diff --git a/HTTPNtlmAuthHandler.py b/HTTPNtlmAuthHandler.py
index 6983c48..22c3d70 100644
--- a/HTTPNtlmAuthHandler.py
+++ b/HTTPNtlmAuthHandler.py
@@ -16,6 +16,7 @@ import base64
 import httplib, socket
 from urllib import addinfourl
 import ntlm
+import string

 class AbstractNtlmAuthHandler:
     def __init__(self, password_mgr=None, debuglevel=0):

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

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Check Issue 14 for updated patches if you have troubles patching.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant