diff options
Diffstat (limited to 'src/mail/ngx_mail_smtp_handler.c')
-rw-r--r-- | src/mail/ngx_mail_smtp_handler.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mail/ngx_mail_smtp_handler.c b/src/mail/ngx_mail_smtp_handler.c index 307ec697d..f4cb69fb1 100644 --- a/src/mail/ngx_mail_smtp_handler.c +++ b/src/mail/ngx_mail_smtp_handler.c @@ -452,7 +452,7 @@ ngx_mail_smtp_auth_state(ngx_event_t *rev) 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; @@ -596,6 +596,14 @@ ngx_mail_smtp_auth(ngx_mail_session_t *s, ngx_connection_t *c) 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; |