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
+++ b/src/mail/ngx_mail_smtp_handler.c
@@ -462,7 +462,7 @@ ngx_mail_smtp_auth_state(ngx_event_t *re
             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 @@ ngx_mail_smtp_auth(ngx_mail_session_t *s
 
         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;