curl-library
[PATCH] Added AUTH NTLM for SMTP
Date: Fri, 29 Jul 2011 12:49:21 +0100
Dear all,
Please find attached a patch for adding AUTH NTLM for SMTP to Libcurl. A summary of changes is as follows:
* Created a new ntlm module which is based on the NTLM code that was present in http_ntlm (v7.21.7).
* Modified the smtp module to support AUTH NTLM.
* Modified the order of the preferred authentication method to AUTH NTLM, AUTH CRAM-MD5, AUTH LOGIN then AUTH PLAIN. AUTH PLAIN should be the last as it is the most insecure.
* Added support for the AUTH parameter in the MAIL FROM command. This is ONLY for authenticated connections and can be set by the user via the CURLOPT_MAIL_AUTH option - If is not set then the CURLOPT_MAIL_FROM value will be used instead.
* Added the ability for the user to specify whether authenticated connections (AUTH NTLM, AUTH LOGIN and AUTH PLAIN) send the initial response in the AUTH command or in the next command. This can be set via the CURLOPT_MAIL_SINGLE_AUTH option but defaults to TRUE to maintain compatibility with the v7.21.7 source.
* Started to integrate the NTLM module into http_ntlm but do to recent changes in the source this it taking longer than I had expected so it still needs to be fully completed.
I wasn't too sure whether to post the patch as a file attachement or as content of the email (as it is quite large and would make reading the email more difficult) I went for the former option ;-)
I have tested the changes against a Microsoft Exchange 2010 Server (using both AUTH NTLM and AUTH LOGIN) as well as with and without TLS enabled. I have build the code against OpenSSL as well as using the Windows SSPI library.
I will hopefully get some time over the weekend to continue with the http_ntlm integration.
Any comments and suggestions or feedback will be grately appreciated.
Kind Regards
Steve
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- application/octet-stream attachment: 0001-Added_AUTH_NTLM_for_SMTP.patch