diff src/mail/ngx_mail.h @ 468:2580fe1c5a9a PATCH_NGINX_MAIL_0_6

Mail: support for smtp auth login with username. According to "[MS-XLOGIN]: SMTP Protocol AUTH LOGIN Extension Specification" (http://msdn.microsoft.com/en-us/library/cc433484.aspx) there is special mode called "AUTH LOGIN with User Name". And it seems to be used by some Microsoft software seen in wild.
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 11 Jan 2009 23:19:26 +0300
parents d67e93e97b4a
children b2e9a7371d49
line wrap: on
line diff
--- a/src/mail/ngx_mail.h
+++ b/src/mail/ngx_mail.h
@@ -258,11 +258,12 @@ typedef struct {
 #define NGX_SMTP_STARTTLS      13
 
 
-#define NGX_MAIL_AUTH_PLAIN     0
-#define NGX_MAIL_AUTH_LOGIN     1
-#define NGX_MAIL_AUTH_APOP      2
-#define NGX_MAIL_AUTH_CRAM_MD5  3
-#define NGX_MAIL_AUTH_NONE      4
+#define NGX_MAIL_AUTH_PLAIN           0
+#define NGX_MAIL_AUTH_LOGIN           1
+#define NGX_MAIL_AUTH_APOP            2
+#define NGX_MAIL_AUTH_CRAM_MD5        3
+#define NGX_MAIL_AUTH_NONE            4
+#define NGX_MAIL_AUTH_LOGIN_USERNAME  5
 
 
 #define NGX_MAIL_AUTH_PLAIN_ENABLED     0x0002
@@ -346,7 +347,7 @@ ngx_int_t ngx_mail_salt(ngx_mail_session
 ngx_int_t ngx_mail_auth_plain(ngx_mail_session_t *s, ngx_connection_t *c,
     ngx_uint_t n);
 ngx_int_t ngx_mail_auth_login_username(ngx_mail_session_t *s,
-    ngx_connection_t *c);
+    ngx_connection_t *c, ngx_int_t initial);
 ngx_int_t ngx_mail_auth_login_password(ngx_mail_session_t *s,
     ngx_connection_t *c);
 ngx_int_t ngx_mail_auth_cram_md5_salt(ngx_mail_session_t *s,