aboutsummaryrefslogtreecommitdiff
path: root/src/mail/ngx_mail_pop3_handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mail/ngx_mail_pop3_handler.c')
-rw-r--r--src/mail/ngx_mail_pop3_handler.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mail/ngx_mail_pop3_handler.c b/src/mail/ngx_mail_pop3_handler.c
index a2d565804..9310c2750 100644
--- a/src/mail/ngx_mail_pop3_handler.c
+++ b/src/mail/ngx_mail_pop3_handler.c
@@ -501,6 +501,10 @@ ngx_mail_pop3_auth(ngx_mail_session_t *s, ngx_connection_t *c)
case NGX_MAIL_AUTH_EXTERNAL:
+ if (!(pscf->auth_methods & NGX_MAIL_AUTH_EXTERNAL_ENABLED)) {
+ return NGX_MAIL_PARSE_INVALID_COMMAND;
+ }
+
ngx_str_set(&s->out, pop3_username);
s->mail_state = ngx_pop3_auth_external;