annotate src/mail/ngx_mail.h @ 336:1c519aff5c0c NGINX_0_6_12

nginx 0.6.12 *) Change: mail proxy was split on three modules: pop3, imap and smtp. *) Feature: the --without-mail_pop3_module, --without-mail_imap_module, and --without-mail_smtp_module configuration parameters. *) Feature: the "smtp_greeting_delay" and "smtp_client_buffer" directives of the ngx_mail_smtp_module. *) Bugfix: the trailing wildcards did not work; bug appeared in 0.6.9. *) Bugfix: nginx could not start on Solaris if the shared PCRE library located in non-standard place was used. *) Bugfix: the "proxy_hide_header" and "fastcgi_hide_header" directives did not hide response header lines whose name was longer than 32 characters. Thanks to Manlio Perillo.
author Igor Sysoev <http://sysoev.ru>
date Fri, 21 Sep 2007 00:00:00 +0400
parents d16d691432c9
children 583decdb82a4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
1
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
2 /*
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
3 * Copyright (C) Igor Sysoev
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
4 */
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
5
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
6
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
7 #ifndef _NGX_MAIL_H_INCLUDED_
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
8 #define _NGX_MAIL_H_INCLUDED_
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
9
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
10
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
11 #include <ngx_config.h>
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
12 #include <ngx_core.h>
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
13 #include <ngx_event.h>
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
14 #include <ngx_event_connect.h>
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
15
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
16 #if (NGX_MAIL_SSL)
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
17 #include <ngx_mail_ssl_module.h>
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
18 #endif
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
19
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
20
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
21
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
22 typedef struct {
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
23 void **main_conf;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
24 void **srv_conf;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
25 } ngx_mail_conf_ctx_t;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
26
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
27
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
28 typedef struct {
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
29 in_addr_t addr;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
30 in_port_t port;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
31 int family;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
32
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
33 /* server ctx */
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
34 ngx_mail_conf_ctx_t *ctx;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
35
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
36 unsigned bind:1;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
37 } ngx_mail_listen_t;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
38
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
39
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
40 typedef struct {
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
41 in_addr_t addr;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
42 ngx_mail_conf_ctx_t *ctx;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
43 ngx_str_t addr_text;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
44 } ngx_mail_in_addr_t;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
45
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
46
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
47 typedef struct {
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
48 ngx_mail_in_addr_t *addrs; /* array of ngx_mail_in_addr_t */
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
49 ngx_uint_t naddrs;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
50 } ngx_mail_in_port_t;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
51
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
52
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
53 typedef struct {
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
54 in_port_t port;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
55 ngx_array_t addrs; /* array of ngx_mail_conf_in_addr_t */
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
56 } ngx_mail_conf_in_port_t;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
57
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
58
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
59 typedef struct {
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
60 in_addr_t addr;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
61 ngx_mail_conf_ctx_t *ctx;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
62 unsigned bind:1;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
63 } ngx_mail_conf_in_addr_t;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
64
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
65
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
66 typedef struct {
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
67 ngx_array_t servers; /* ngx_mail_core_srv_conf_t */
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
68 ngx_array_t listen; /* ngx_mail_listen_t */
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
69 } ngx_mail_core_main_conf_t;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
70
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
71
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
72 #define NGX_MAIL_POP3_PROTOCOL 0
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
73 #define NGX_MAIL_IMAP_PROTOCOL 1
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
74 #define NGX_MAIL_SMTP_PROTOCOL 2
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
75
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
76
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
77 typedef struct ngx_mail_protocol_s ngx_mail_protocol_t;
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
78
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
79
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
80 typedef struct {
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
81 ngx_mail_protocol_t *protocol;
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
82
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
83 ngx_msec_t timeout;
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
84
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
85 ngx_flag_t so_keepalive;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
86
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
87 ngx_str_t server_name;
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
88
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
89 u_char *file_name;
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
90 ngx_int_t line;
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
91
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
92 /* server ctx */
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
93 ngx_mail_conf_ctx_t *ctx;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
94 } ngx_mail_core_srv_conf_t;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
95
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
96
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
97 typedef enum {
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
98 ngx_pop3_start = 0,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
99 ngx_pop3_user,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
100 ngx_pop3_passwd,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
101 ngx_pop3_auth_login_username,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
102 ngx_pop3_auth_login_password,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
103 ngx_pop3_auth_plain,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
104 ngx_pop3_auth_cram_md5
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
105 } ngx_po3_state_e;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
106
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
107
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
108 typedef enum {
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
109 ngx_imap_start = 0,
322
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
110 ngx_imap_auth_login_username,
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
111 ngx_imap_auth_login_password,
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
112 ngx_imap_auth_plain,
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
113 ngx_imap_auth_cram_md5,
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
114 ngx_imap_login,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
115 ngx_imap_user,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
116 ngx_imap_passwd
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
117 } ngx_imap_state_e;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
118
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
119
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
120 typedef enum {
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
121 ngx_smtp_start = 0,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
122 ngx_smtp_auth_login_username,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
123 ngx_smtp_auth_login_password,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
124 ngx_smtp_auth_plain,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
125 ngx_smtp_auth_cram_md5,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
126 ngx_smtp_helo,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
127 ngx_smtp_noxclient,
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
128 ngx_smtp_xclient
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
129 } ngx_smtp_state_e;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
130
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
131
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
132 typedef struct {
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
133 ngx_peer_connection_t upstream;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
134 ngx_buf_t *buffer;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
135 } ngx_mail_proxy_ctx_t;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
136
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
137
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
138 typedef struct {
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
139 uint32_t signature; /* "MAIL" */
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
140
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
141 ngx_connection_t *connection;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
142
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
143 ngx_str_t out;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
144 ngx_buf_t *buffer;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
145
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
146 void **ctx;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
147 void **main_conf;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
148 void **srv_conf;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
149
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
150 ngx_mail_proxy_ctx_t *proxy;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
151
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
152 ngx_uint_t mail_state;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
153
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
154 unsigned protocol:3;
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
155 unsigned blocked:1;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
156 unsigned quit:1;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
157 unsigned quoted:1;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
158 unsigned backslash:1;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
159 unsigned no_sync_literal:1;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
160 unsigned starttls:1;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
161 unsigned esmtp:1;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
162 unsigned auth_method:2;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
163 unsigned auth_wait:1;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
164
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
165 ngx_str_t login;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
166 ngx_str_t passwd;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
167
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
168 ngx_str_t salt;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
169 ngx_str_t tag;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
170 ngx_str_t tagged_line;
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
171 ngx_str_t text;
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
172
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
173 ngx_str_t *addr_text;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
174 ngx_str_t smtp_helo;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
175
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
176 ngx_uint_t command;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
177 ngx_array_t args;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
178
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
179 ngx_uint_t login_attempt;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
180
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
181 /* used to parse POP3/IMAP/SMTP command */
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
182
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
183 ngx_uint_t state;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
184 u_char *cmd_start;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
185 u_char *arg_start;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
186 u_char *arg_end;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
187 ngx_uint_t literal_len;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
188 } ngx_mail_session_t;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
189
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
190
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
191 typedef struct {
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
192 ngx_str_t *client;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
193 ngx_mail_session_t *session;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
194 } ngx_mail_log_ctx_t;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
195
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
196
322
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
197 #define NGX_POP3_USER 1
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
198 #define NGX_POP3_PASS 2
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
199 #define NGX_POP3_CAPA 3
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
200 #define NGX_POP3_QUIT 4
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
201 #define NGX_POP3_NOOP 5
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
202 #define NGX_POP3_STLS 6
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
203 #define NGX_POP3_APOP 7
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
204 #define NGX_POP3_AUTH 8
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
205 #define NGX_POP3_STAT 9
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
206 #define NGX_POP3_LIST 10
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
207 #define NGX_POP3_RETR 11
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
208 #define NGX_POP3_DELE 12
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
209 #define NGX_POP3_RSET 13
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
210 #define NGX_POP3_TOP 14
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
211 #define NGX_POP3_UIDL 15
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
212
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
213
322
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
214 #define NGX_IMAP_LOGIN 1
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
215 #define NGX_IMAP_LOGOUT 2
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
216 #define NGX_IMAP_CAPABILITY 3
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
217 #define NGX_IMAP_NOOP 4
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
218 #define NGX_IMAP_STARTTLS 5
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
219
322
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
220 #define NGX_IMAP_NEXT 6
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
221
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
222 #define NGX_IMAP_AUTHENTICATE 7
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
223
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
224
322
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
225 #define NGX_SMTP_HELO 1
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
226 #define NGX_SMTP_EHLO 2
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
227 #define NGX_SMTP_AUTH 3
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
228 #define NGX_SMTP_QUIT 4
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
229 #define NGX_SMTP_NOOP 5
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
230 #define NGX_SMTP_MAIL 6
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
231 #define NGX_SMTP_RSET 7
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
232 #define NGX_SMTP_RCPT 8
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
233 #define NGX_SMTP_DATA 9
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
234 #define NGX_SMTP_VRFY 10
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
235 #define NGX_SMTP_EXPN 11
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
236 #define NGX_SMTP_HELP 12
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
237 #define NGX_SMTP_STARTTLS 13
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
238
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
239
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
240 #define NGX_MAIL_AUTH_PLAIN 0
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
241 #define NGX_MAIL_AUTH_LOGIN 1
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
242 #define NGX_MAIL_AUTH_APOP 2
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
243 #define NGX_MAIL_AUTH_CRAM_MD5 3
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
244
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
245
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
246 #define NGX_MAIL_AUTH_PLAIN_ENABLED 0x0002
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
247 #define NGX_MAIL_AUTH_LOGIN_ENABLED 0x0004
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
248 #define NGX_MAIL_AUTH_APOP_ENABLED 0x0008
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
249 #define NGX_MAIL_AUTH_CRAM_MD5_ENABLED 0x0010
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
250
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
251
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
252 #define NGX_MAIL_PARSE_INVALID_COMMAND 20
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
253
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
254
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
255 typedef void (*ngx_mail_init_session_pt)(ngx_mail_session_t *s,
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
256 ngx_connection_t *c);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
257 typedef void (*ngx_mail_init_protocol_pt)(ngx_event_t *rev);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
258 typedef void (*ngx_mail_auth_state_pt)(ngx_event_t *rev);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
259 typedef ngx_int_t (*ngx_mail_parse_command_pt)(ngx_mail_session_t *s);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
260
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
261
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
262 struct ngx_mail_protocol_s {
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
263 ngx_str_t name;
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
264 in_port_t port[4];
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
265 ngx_uint_t type;
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
266
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
267 ngx_mail_init_session_pt init_session;
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
268 ngx_mail_init_protocol_pt init_protocol;
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
269 ngx_mail_parse_command_pt parse_command;
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
270 ngx_mail_auth_state_pt auth_state;
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
271
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
272 ngx_str_t internal_server_error;
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
273 };
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
274
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
275
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
276 typedef struct {
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
277 ngx_mail_protocol_t *protocol;
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
278
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
279 void *(*create_main_conf)(ngx_conf_t *cf);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
280 char *(*init_main_conf)(ngx_conf_t *cf, void *conf);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
281
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
282 void *(*create_srv_conf)(ngx_conf_t *cf);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
283 char *(*merge_srv_conf)(ngx_conf_t *cf, void *prev,
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
284 void *conf);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
285 } ngx_mail_module_t;
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
286
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
287
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
288 #define NGX_MAIL_MODULE 0x4C49414D /* "MAIL" */
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
289
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
290 #define NGX_MAIL_MAIN_CONF 0x02000000
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
291 #define NGX_MAIL_SRV_CONF 0x04000000
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
292
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
293
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
294 #define NGX_MAIL_MAIN_CONF_OFFSET offsetof(ngx_mail_conf_ctx_t, main_conf)
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
295 #define NGX_MAIL_SRV_CONF_OFFSET offsetof(ngx_mail_conf_ctx_t, srv_conf)
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
296
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
297
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
298 #define ngx_mail_get_module_ctx(s, module) (s)->ctx[module.ctx_index]
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
299 #define ngx_mail_set_ctx(s, c, module) s->ctx[module.ctx_index] = c;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
300 #define ngx_mail_delete_ctx(s, module) s->ctx[module.ctx_index] = NULL;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
301
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
302
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
303 #define ngx_mail_get_module_main_conf(s, module) \
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
304 (s)->main_conf[module.ctx_index]
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
305 #define ngx_mail_get_module_srv_conf(s, module) (s)->srv_conf[module.ctx_index]
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
306
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
307 #define ngx_mail_conf_get_module_main_conf(cf, module) \
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
308 ((ngx_mail_conf_ctx_t *) cf->ctx)->main_conf[module.ctx_index]
322
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
309 #define ngx_mail_conf_get_module_srv_conf(cf, module) \
d16d691432c9 nginx 0.6.5
Igor Sysoev <http://sysoev.ru>
parents: 290
diff changeset
310 ((ngx_mail_conf_ctx_t *) cf->ctx)->srv_conf[module.ctx_index]
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
311
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
312
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
313 #if (NGX_MAIL_SSL)
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
314 void ngx_mail_starttls_handler(ngx_event_t *rev);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
315 ngx_int_t ngx_mail_starttls_only(ngx_mail_session_t *s, ngx_connection_t *c);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
316 #endif
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
317
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
318
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
319 void ngx_mail_init_connection(ngx_connection_t *c);
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
320
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
321 ngx_int_t ngx_mail_salt(ngx_mail_session_t *s, ngx_connection_t *c,
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
322 ngx_mail_core_srv_conf_t *cscf);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
323 ngx_int_t ngx_mail_auth_plain(ngx_mail_session_t *s, ngx_connection_t *c,
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
324 ngx_uint_t n);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
325 ngx_int_t ngx_mail_auth_login_username(ngx_mail_session_t *s,
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
326 ngx_connection_t *c);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
327 ngx_int_t ngx_mail_auth_login_password(ngx_mail_session_t *s,
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
328 ngx_connection_t *c);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
329 ngx_int_t ngx_mail_auth_cram_md5_salt(ngx_mail_session_t *s,
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
330 ngx_connection_t *c, char *prefix, size_t len);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
331 ngx_int_t ngx_mail_auth_cram_md5(ngx_mail_session_t *s, ngx_connection_t *c);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
332 ngx_int_t ngx_mail_auth_parse(ngx_mail_session_t *s, ngx_connection_t *c);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
333
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
334 void ngx_mail_send(ngx_event_t *wev);
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
335 ngx_int_t ngx_mail_read_command(ngx_mail_session_t *s, ngx_connection_t *c);
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
336 void ngx_mail_auth(ngx_mail_session_t *s, ngx_connection_t *c);
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
337 void ngx_mail_close_connection(ngx_connection_t *c);
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
338 void ngx_mail_session_internal_server_error(ngx_mail_session_t *s);
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
339 u_char *ngx_mail_log_error(ngx_log_t *log, u_char *buf, size_t len);
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
340
336
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
341
1c519aff5c0c nginx 0.6.12
Igor Sysoev <http://sysoev.ru>
parents: 322
diff changeset
342 char *ngx_mail_capabilities(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
290
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
343
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
344
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
345 /* STUB */
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
346 void ngx_mail_proxy_init(ngx_mail_session_t *s, ngx_peer_addr_t *peer);
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
347 void ngx_mail_auth_http_init(ngx_mail_session_t *s);
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
348 /**/
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
349
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
350
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
351 extern ngx_uint_t ngx_mail_max_module;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
352 extern ngx_module_t ngx_mail_core_module;
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
353
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
354
f745bf973510 nginx 0.5.15
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
355 #endif /* _NGX_MAIL_H_INCLUDED_ */