Mercurial > hg > nginx
comparison src/mail/ngx_mail_smtp_handler.c @ 1896:4c060e30476b
do not resolve SMTP clients by default
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 16 Feb 2008 13:46:33 +0000 |
parents | 057d362ee50e |
children | 2a92804f4109 f4aea5b40fd7 |
comparison
equal
deleted
inserted
replaced
1895:2e3353955c32 | 1896:4c060e30476b |
---|---|
52 { | 52 { |
53 struct sockaddr_in *sin; | 53 struct sockaddr_in *sin; |
54 ngx_resolver_ctx_t *ctx; | 54 ngx_resolver_ctx_t *ctx; |
55 ngx_mail_core_srv_conf_t *cscf; | 55 ngx_mail_core_srv_conf_t *cscf; |
56 | 56 |
57 cscf = ngx_mail_get_module_srv_conf(s, ngx_mail_core_module); | |
58 | |
59 if (cscf->resolver == NULL) { | |
60 s->host = smtp_unavailable; | |
61 ngx_mail_smtp_greeting(s, c); | |
62 return; | |
63 } | |
64 | |
57 c->log->action = "in resolving client address"; | 65 c->log->action = "in resolving client address"; |
58 | |
59 cscf = ngx_mail_get_module_srv_conf(s, ngx_mail_core_module); | |
60 | 66 |
61 ctx = ngx_resolve_start(cscf->resolver, NULL); | 67 ctx = ngx_resolve_start(cscf->resolver, NULL); |
62 if (ctx == NULL) { | 68 if (ctx == NULL) { |
63 ngx_mail_close_connection(c); | 69 ngx_mail_close_connection(c); |
64 return; | 70 return; |