comparison 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
comparison
equal deleted inserted replaced
467:d67e93e97b4a 468:2580fe1c5a9a
256 #define NGX_SMTP_EXPN 11 256 #define NGX_SMTP_EXPN 11
257 #define NGX_SMTP_HELP 12 257 #define NGX_SMTP_HELP 12
258 #define NGX_SMTP_STARTTLS 13 258 #define NGX_SMTP_STARTTLS 13
259 259
260 260
261 #define NGX_MAIL_AUTH_PLAIN 0 261 #define NGX_MAIL_AUTH_PLAIN 0
262 #define NGX_MAIL_AUTH_LOGIN 1 262 #define NGX_MAIL_AUTH_LOGIN 1
263 #define NGX_MAIL_AUTH_APOP 2 263 #define NGX_MAIL_AUTH_APOP 2
264 #define NGX_MAIL_AUTH_CRAM_MD5 3 264 #define NGX_MAIL_AUTH_CRAM_MD5 3
265 #define NGX_MAIL_AUTH_NONE 4 265 #define NGX_MAIL_AUTH_NONE 4
266 #define NGX_MAIL_AUTH_LOGIN_USERNAME 5
266 267
267 268
268 #define NGX_MAIL_AUTH_PLAIN_ENABLED 0x0002 269 #define NGX_MAIL_AUTH_PLAIN_ENABLED 0x0002
269 #define NGX_MAIL_AUTH_LOGIN_ENABLED 0x0004 270 #define NGX_MAIL_AUTH_LOGIN_ENABLED 0x0004
270 #define NGX_MAIL_AUTH_APOP_ENABLED 0x0008 271 #define NGX_MAIL_AUTH_APOP_ENABLED 0x0008
344 ngx_int_t ngx_mail_salt(ngx_mail_session_t *s, ngx_connection_t *c, 345 ngx_int_t ngx_mail_salt(ngx_mail_session_t *s, ngx_connection_t *c,
345 ngx_mail_core_srv_conf_t *cscf); 346 ngx_mail_core_srv_conf_t *cscf);
346 ngx_int_t ngx_mail_auth_plain(ngx_mail_session_t *s, ngx_connection_t *c, 347 ngx_int_t ngx_mail_auth_plain(ngx_mail_session_t *s, ngx_connection_t *c,
347 ngx_uint_t n); 348 ngx_uint_t n);
348 ngx_int_t ngx_mail_auth_login_username(ngx_mail_session_t *s, 349 ngx_int_t ngx_mail_auth_login_username(ngx_mail_session_t *s,
349 ngx_connection_t *c); 350 ngx_connection_t *c, ngx_int_t initial);
350 ngx_int_t ngx_mail_auth_login_password(ngx_mail_session_t *s, 351 ngx_int_t ngx_mail_auth_login_password(ngx_mail_session_t *s,
351 ngx_connection_t *c); 352 ngx_connection_t *c);
352 ngx_int_t ngx_mail_auth_cram_md5_salt(ngx_mail_session_t *s, 353 ngx_int_t ngx_mail_auth_cram_md5_salt(ngx_mail_session_t *s,
353 ngx_connection_t *c, char *prefix, size_t len); 354 ngx_connection_t *c, char *prefix, size_t len);
354 ngx_int_t ngx_mail_auth_cram_md5(ngx_mail_session_t *s, ngx_connection_t *c); 355 ngx_int_t ngx_mail_auth_cram_md5(ngx_mail_session_t *s, ngx_connection_t *c);