comparison src/mail/ngx_mail.h @ 322:d16d691432c9 NGINX_0_6_5

nginx 0.6.5 *) Feature: $nginx_version variable. Thanks to Nick S. Grechukh. *) Feature: the mail proxy supports AUTHENTICATE in IMAP mode. Thanks to Maxim Dounin. *) Feature: the mail proxy supports STARTTLS in SMTP mode. Thanks to Maxim Dounin. *) Bugfix: now nginx escapes space in $memcached_key variable. *) Bugfix: nginx was incorrectly built by Sun Studio on Solaris/amd64. Thanks to Jiang Hong. *) Bugfix: of minor potential bugs. Thanks to Coverity's Scan.
author Igor Sysoev <http://sysoev.ru>
date Mon, 23 Jul 2007 00:00:00 +0400
parents f745bf973510
children 1c519aff5c0c
comparison
equal deleted inserted replaced
321:a87830ef6fdd 322:d16d691432c9
90 ngx_str_t imap_capability; 90 ngx_str_t imap_capability;
91 ngx_str_t imap_starttls_capability; 91 ngx_str_t imap_starttls_capability;
92 ngx_str_t imap_starttls_only_capability; 92 ngx_str_t imap_starttls_only_capability;
93 93
94 ngx_str_t smtp_capability; 94 ngx_str_t smtp_capability;
95 ngx_str_t smtp_starttls_capability;
96 ngx_str_t smtp_starttls_only_capability;
95 97
96 ngx_str_t server_name; 98 ngx_str_t server_name;
97 ngx_str_t smtp_server_name; 99 ngx_str_t smtp_server_name;
98 ngx_str_t smtp_greeting; 100 ngx_str_t smtp_greeting;
99 101
100 ngx_uint_t pop3_auth_methods; 102 ngx_uint_t pop3_auth_methods;
103 ngx_uint_t imap_auth_methods;
101 ngx_uint_t smtp_auth_methods; 104 ngx_uint_t smtp_auth_methods;
102 105
103 ngx_array_t pop3_capabilities; 106 ngx_array_t pop3_capabilities;
104 ngx_array_t imap_capabilities; 107 ngx_array_t imap_capabilities;
105 ngx_array_t smtp_capabilities; 108 ngx_array_t smtp_capabilities;
130 } ngx_po3_state_e; 133 } ngx_po3_state_e;
131 134
132 135
133 typedef enum { 136 typedef enum {
134 ngx_imap_start = 0, 137 ngx_imap_start = 0,
138 ngx_imap_auth_login_username,
139 ngx_imap_auth_login_password,
140 ngx_imap_auth_plain,
141 ngx_imap_auth_cram_md5,
135 ngx_imap_login, 142 ngx_imap_login,
136 ngx_imap_user, 143 ngx_imap_user,
137 ngx_imap_passwd 144 ngx_imap_passwd
138 } ngx_imap_state_e; 145 } ngx_imap_state_e;
139 146
212 ngx_str_t *client; 219 ngx_str_t *client;
213 ngx_mail_session_t *session; 220 ngx_mail_session_t *session;
214 } ngx_mail_log_ctx_t; 221 } ngx_mail_log_ctx_t;
215 222
216 223
217 #define NGX_POP3_USER 1 224 #define NGX_POP3_USER 1
218 #define NGX_POP3_PASS 2 225 #define NGX_POP3_PASS 2
219 #define NGX_POP3_CAPA 3 226 #define NGX_POP3_CAPA 3
220 #define NGX_POP3_QUIT 4 227 #define NGX_POP3_QUIT 4
221 #define NGX_POP3_NOOP 5 228 #define NGX_POP3_NOOP 5
222 #define NGX_POP3_STLS 6 229 #define NGX_POP3_STLS 6
223 #define NGX_POP3_APOP 7 230 #define NGX_POP3_APOP 7
224 #define NGX_POP3_AUTH 8 231 #define NGX_POP3_AUTH 8
225 #define NGX_POP3_STAT 9 232 #define NGX_POP3_STAT 9
226 #define NGX_POP3_LIST 10 233 #define NGX_POP3_LIST 10
227 #define NGX_POP3_RETR 11 234 #define NGX_POP3_RETR 11
228 #define NGX_POP3_DELE 12 235 #define NGX_POP3_DELE 12
229 #define NGX_POP3_RSET 13 236 #define NGX_POP3_RSET 13
230 #define NGX_POP3_TOP 14 237 #define NGX_POP3_TOP 14
231 #define NGX_POP3_UIDL 15 238 #define NGX_POP3_UIDL 15
232 239
233 240
234 #define NGX_IMAP_LOGIN 1 241 #define NGX_IMAP_LOGIN 1
235 #define NGX_IMAP_LOGOUT 2 242 #define NGX_IMAP_LOGOUT 2
236 #define NGX_IMAP_CAPABILITY 3 243 #define NGX_IMAP_CAPABILITY 3
237 #define NGX_IMAP_NOOP 4 244 #define NGX_IMAP_NOOP 4
238 #define NGX_IMAP_STARTTLS 5 245 #define NGX_IMAP_STARTTLS 5
239 246
240 #define NGX_IMAP_NEXT 6 247 #define NGX_IMAP_NEXT 6
241 248
242 249 #define NGX_IMAP_AUTHENTICATE 7
243 #define NGX_SMTP_HELO 1 250
244 #define NGX_SMTP_EHLO 2 251
245 #define NGX_SMTP_AUTH 3 252 #define NGX_SMTP_HELO 1
246 #define NGX_SMTP_QUIT 4 253 #define NGX_SMTP_EHLO 2
247 #define NGX_SMTP_NOOP 5 254 #define NGX_SMTP_AUTH 3
248 #define NGX_SMTP_MAIL 6 255 #define NGX_SMTP_QUIT 4
249 #define NGX_SMTP_RSET 7 256 #define NGX_SMTP_NOOP 5
257 #define NGX_SMTP_MAIL 6
258 #define NGX_SMTP_RSET 7
259 #define NGX_SMTP_RCPT 8
260 #define NGX_SMTP_DATA 9
261 #define NGX_SMTP_VRFY 10
262 #define NGX_SMTP_EXPN 11
263 #define NGX_SMTP_HELP 12
264 #define NGX_SMTP_STARTTLS 13
250 265
251 266
252 #define NGX_MAIL_AUTH_PLAIN 0 267 #define NGX_MAIL_AUTH_PLAIN 0
253 #define NGX_MAIL_AUTH_LOGIN 1 268 #define NGX_MAIL_AUTH_LOGIN 1
254 #define NGX_MAIL_AUTH_APOP 2 269 #define NGX_MAIL_AUTH_APOP 2
283 (s)->main_conf[module.ctx_index] 298 (s)->main_conf[module.ctx_index]
284 #define ngx_mail_get_module_srv_conf(s, module) (s)->srv_conf[module.ctx_index] 299 #define ngx_mail_get_module_srv_conf(s, module) (s)->srv_conf[module.ctx_index]
285 300
286 #define ngx_mail_conf_get_module_main_conf(cf, module) \ 301 #define ngx_mail_conf_get_module_main_conf(cf, module) \
287 ((ngx_mail_conf_ctx_t *) cf->ctx)->main_conf[module.ctx_index] 302 ((ngx_mail_conf_ctx_t *) cf->ctx)->main_conf[module.ctx_index]
303 #define ngx_mail_conf_get_module_srv_conf(cf, module) \
304 ((ngx_mail_conf_ctx_t *) cf->ctx)->srv_conf[module.ctx_index]
288 305
289 306
290 void ngx_mail_init_connection(ngx_connection_t *c); 307 void ngx_mail_init_connection(ngx_connection_t *c);
291 void ngx_mail_send(ngx_event_t *wev); 308 void ngx_mail_send(ngx_event_t *wev);
292 void ngx_pop3_auth_state(ngx_event_t *rev); 309 void ngx_pop3_auth_state(ngx_event_t *rev);