15 static void *ngx_mail_smtp_create_srv_conf(
ngx_conf_t *cf);
16 static char *ngx_mail_smtp_merge_srv_conf(
ngx_conf_t *cf,
void *parent,
29 static ngx_str_t ngx_mail_smtp_auth_methods_names[] = {
80 &ngx_mail_smtp_auth_methods },
87 &ngx_mail_smtp_protocol,
92 ngx_mail_smtp_create_srv_conf,
93 ngx_mail_smtp_merge_srv_conf
99 &ngx_mail_smtp_module_ctx,
100 ngx_mail_smtp_commands,
137 ngx_mail_smtp_merge_srv_conf(
ngx_conf_t *cf,
void *parent,
void *child)
142 u_char *p, *auth, *last;
174 *p++ =
'2'; *p++ =
'2'; *p++ =
'0'; *p++ =
' ';
189 *p++ =
'2'; *p++ =
'5'; *p++ =
'0'; *p++ =
' ';
202 size +=
sizeof(
"250 ") - 1 + c[i].len +
sizeof(
CRLF) - 1;
212 size += 1 + ngx_mail_smtp_auth_methods_names[
i].
len;
218 size +=
sizeof(
"250 AUTH") - 1 +
sizeof(
CRLF) - 1;
231 *p++ =
'2'; *p++ =
'5'; *p++ =
'0'; *p++ =
'-';
233 *p++ =
CR; *p++ =
LF;
237 *p++ =
'2'; *p++ =
'5'; *p++ =
'0'; *p++ =
'-';
239 *p++ =
CR; *p++ =
LF;
247 *p++ =
'2'; *p++ =
'5'; *p++ =
'0'; *p++ =
' ';
248 *p++ =
'A'; *p++ =
'U'; *p++ =
'T'; *p++ =
'H';
256 p =
ngx_cpymem(p, ngx_mail_smtp_auth_methods_names[i].data,
257 ngx_mail_smtp_auth_methods_names[i].len);
267 size +=
sizeof(
"250 STARTTLS" CRLF) - 1;
287 +
sizeof(
"250 STARTTLS" CRLF) - 1;