Mercurial > hg > nginx-mail
comparison src/mail/ngx_mail_smtp_module.c @ 382:984bb0b1399b NGINX_0_7_3
nginx 0.7.3
*) Change: the "rss" extension MIME type has been changed to
"application/rss+xml".
*) Change: now the "gzip_vary" directive turned on issues a
"Vary: Accept-Encoding" header line for uncompressed responses too.
*) Feature: now the "rewrite" directive does a redirect automatically
if the "https://" protocol is used.
*) Bugfix: the "proxy_pass" directive did not work with the HTTPS
protocol; the bug had appeared in 0.6.9.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 23 Jun 2008 00:00:00 +0400 |
parents | 1c519aff5c0c |
children | cd9cb7a3ff9e ad0a34a8efa6 |
comparison
equal
deleted
inserted
replaced
381:23d1555141d9 | 382:984bb0b1399b |
---|---|
158 | 158 |
159 cscf = ngx_mail_conf_get_module_srv_conf(cf, ngx_mail_core_module); | 159 cscf = ngx_mail_conf_get_module_srv_conf(cf, ngx_mail_core_module); |
160 | 160 |
161 size = sizeof("220 ESMTP ready" CRLF) - 1 + cscf->server_name.len; | 161 size = sizeof("220 ESMTP ready" CRLF) - 1 + cscf->server_name.len; |
162 | 162 |
163 p = ngx_palloc(cf->pool, size); | 163 p = ngx_pnalloc(cf->pool, size); |
164 if (p == NULL) { | 164 if (p == NULL) { |
165 return NGX_CONF_ERROR; | 165 return NGX_CONF_ERROR; |
166 } | 166 } |
167 | 167 |
168 conf->greeting.len = size; | 168 conf->greeting.len = size; |
173 ngx_memcpy(p, " ESMTP ready" CRLF, sizeof(" ESMTP ready" CRLF) - 1); | 173 ngx_memcpy(p, " ESMTP ready" CRLF, sizeof(" ESMTP ready" CRLF) - 1); |
174 | 174 |
175 | 175 |
176 size = sizeof("250 " CRLF) - 1 + cscf->server_name.len; | 176 size = sizeof("250 " CRLF) - 1 + cscf->server_name.len; |
177 | 177 |
178 p = ngx_palloc(cf->pool, size); | 178 p = ngx_pnalloc(cf->pool, size); |
179 if (p == NULL) { | 179 if (p == NULL) { |
180 return NGX_CONF_ERROR; | 180 return NGX_CONF_ERROR; |
181 } | 181 } |
182 | 182 |
183 conf->server_name.len = size; | 183 conf->server_name.len = size; |
207 if (m & conf->auth_methods) { | 207 if (m & conf->auth_methods) { |
208 size += 1 + ngx_mail_smtp_auth_methods_names[i].len; | 208 size += 1 + ngx_mail_smtp_auth_methods_names[i].len; |
209 } | 209 } |
210 } | 210 } |
211 | 211 |
212 p = ngx_palloc(cf->pool, size); | 212 p = ngx_pnalloc(cf->pool, size); |
213 if (p == NULL) { | 213 if (p == NULL) { |
214 return NGX_CONF_ERROR; | 214 return NGX_CONF_ERROR; |
215 } | 215 } |
216 | 216 |
217 conf->capability.len = size; | 217 conf->capability.len = size; |
245 | 245 |
246 *p++ = CR; *p = LF; | 246 *p++ = CR; *p = LF; |
247 | 247 |
248 size += sizeof("250 STARTTLS" CRLF) - 1; | 248 size += sizeof("250 STARTTLS" CRLF) - 1; |
249 | 249 |
250 p = ngx_palloc(cf->pool, size); | 250 p = ngx_pnalloc(cf->pool, size); |
251 if (p == NULL) { | 251 if (p == NULL) { |
252 return NGX_CONF_ERROR; | 252 return NGX_CONF_ERROR; |
253 } | 253 } |
254 | 254 |
255 conf->starttls_capability.len = size; | 255 conf->starttls_capability.len = size; |
266 *p = '-'; | 266 *p = '-'; |
267 | 267 |
268 size = (auth - conf->capability.data) | 268 size = (auth - conf->capability.data) |
269 + sizeof("250 STARTTLS" CRLF) - 1; | 269 + sizeof("250 STARTTLS" CRLF) - 1; |
270 | 270 |
271 p = ngx_palloc(cf->pool, size); | 271 p = ngx_pnalloc(cf->pool, size); |
272 if (p == NULL) { | 272 if (p == NULL) { |
273 return NGX_CONF_ERROR; | 273 return NGX_CONF_ERROR; |
274 } | 274 } |
275 | 275 |
276 conf->starttls_only_capability.len = size; | 276 conf->starttls_only_capability.len = size; |