diff src/mail/ngx_mail_smtp_handler.c @ 2495:a59b26eee816

compatibility with Microsoft's AUTH LOGIN [base64 encoded user name ] patch by Maxim Dounin
author Igor Sysoev <igor@sysoev.ru>
date Mon, 09 Feb 2009 12:03:55 +0000
parents ac695b3e981c
children a96a8c916b0c
line wrap: on
line diff
--- a/src/mail/ngx_mail_smtp_handler.c	Thu Feb 05 16:01:50 2009 +0000
+++ b/src/mail/ngx_mail_smtp_handler.c	Mon Feb 09 12:03:55 2009 +0000
@@ -462,7 +462,7 @@
             break;
 
         case ngx_smtp_auth_login_username:
-            rc = ngx_mail_auth_login_username(s, c);
+            rc = ngx_mail_auth_login_username(s, c, 0);
 
             s->out.len = sizeof(smtp_password) - 1;
             s->out.data = smtp_password;
@@ -611,6 +611,14 @@
 
         return NGX_OK;
 
+    case NGX_MAIL_AUTH_LOGIN_USERNAME:
+
+        s->out.len = sizeof(smtp_password) - 1;
+        s->out.data = smtp_password;
+        s->mail_state = ngx_smtp_auth_login_password;
+
+        return ngx_mail_auth_login_username(s, c, 1);
+
     case NGX_MAIL_AUTH_PLAIN:
 
         s->out.len = sizeof(smtp_next) - 1;