15 static void *ngx_mail_imap_create_srv_conf(
ngx_conf_t *cf);
16 static char *ngx_mail_imap_merge_srv_conf(
ngx_conf_t *cf,
void *parent,
20 static ngx_str_t ngx_mail_imap_default_capabilities[] = {
36 static ngx_str_t ngx_mail_imap_auth_methods_names[] = {
80 &ngx_mail_imap_auth_methods },
87 &ngx_mail_imap_protocol,
92 ngx_mail_imap_create_srv_conf,
93 ngx_mail_imap_merge_srv_conf
99 &ngx_mail_imap_module_ctx,
100 ngx_mail_imap_commands,
136 ngx_mail_imap_merge_srv_conf(
ngx_conf_t *cf,
void *parent,
void *child)
162 for (d = ngx_mail_imap_default_capabilities; d->
len; d++) {
172 size =
sizeof(
"* CAPABILITY" CRLF) - 1;
176 size += 1 + c[
i].
len;
184 size += 1 + ngx_mail_imap_auth_methods_names[
i].
len;
196 p =
ngx_cpymem(p,
"* CAPABILITY",
sizeof(
"* CAPABILITY") - 1);
211 p =
ngx_cpymem(p, ngx_mail_imap_auth_methods_names[i].data,
212 ngx_mail_imap_auth_methods_names[i].len);
219 size +=
sizeof(
" STARTTLS") - 1;
231 p =
ngx_cpymem(p,
" STARTTLS",
sizeof(
" STARTTLS") - 1);
236 +
sizeof(
" STARTTLS LOGINDISABLED") - 1;
249 sizeof(
" STARTTLS LOGINDISABLED") - 1);