diff src/mail/ngx_mail_pop3_handler.c @ 386:1878e9c00f22 NGINX_0_6_37

nginx 0.6.37 *) Feature: Microsoft specific "AUTH LOGIN with User Name" mode support in mail proxy server. Thanks to Maxim Dounin. *) Bugfix: nginx could not be built on platforms different from i386, amd64, sparc, and ppc; the bug had appeared in 0.6.36.
author Igor Sysoev <http://sysoev.ru>
date Mon, 18 May 2009 00:00:00 +0400
parents b743d290eb3b
children
line wrap: on
line diff
--- a/src/mail/ngx_mail_pop3_handler.c
+++ b/src/mail/ngx_mail_pop3_handler.c
@@ -226,7 +226,7 @@ ngx_mail_pop3_auth_state(ngx_event_t *re
             break;
 
         case ngx_pop3_auth_login_username:
-            rc = ngx_mail_auth_login_username(s, c);
+            rc = ngx_mail_auth_login_username(s, c, 0);
 
             s->out.len = sizeof(pop3_password) - 1;
             s->out.data = pop3_password;
@@ -474,6 +474,14 @@ ngx_mail_pop3_auth(ngx_mail_session_t *s
 
         return NGX_OK;
 
+    case NGX_MAIL_AUTH_LOGIN_USERNAME:
+
+        s->out.len = sizeof(pop3_password) - 1;
+        s->out.data = pop3_password;
+        s->mail_state = ngx_pop3_auth_login_password;
+
+        return ngx_mail_auth_login_username(s, c, 1);
+
     case NGX_MAIL_AUTH_PLAIN:
 
         s->out.len = sizeof(pop3_next) - 1;