comparison src/imap/ngx_imap.h @ 252:644510700914 NGINX_0_4_11

nginx 0.4.11 *) Feature: the POP3 proxy supports the AUTH LOGIN PLAIN and CRAM-MD5. *) Feature: the ngx_http_perl_module supports the $r->allow_ranges method. *) Bugfix: if the APOP was enabled in the POP3 proxy, then the USER/PASS commands might not work; bug appeared in 0.4.10.
author Igor Sysoev <http://sysoev.ru>
date Wed, 25 Oct 2006 00:00:00 +0400
parents fbf2b2f66c9f
children 0effe91f6083
comparison
equal deleted inserted replaced
251:16ffa8ae5759 252:644510700914
81 81
82 ngx_flag_t so_keepalive; 82 ngx_flag_t so_keepalive;
83 83
84 ngx_str_t pop3_capability; 84 ngx_str_t pop3_capability;
85 ngx_str_t pop3_starttls_capability; 85 ngx_str_t pop3_starttls_capability;
86 ngx_str_t pop3_auth_capability;
87
86 ngx_str_t imap_capability; 88 ngx_str_t imap_capability;
87 ngx_str_t imap_starttls_capability; 89 ngx_str_t imap_starttls_capability;
88 ngx_str_t imap_starttls_only_capability; 90 ngx_str_t imap_starttls_only_capability;
89 91
90 ngx_str_t server_name; 92 ngx_str_t server_name;
118 120
119 121
120 typedef enum { 122 typedef enum {
121 ngx_pop3_start = 0, 123 ngx_pop3_start = 0,
122 ngx_pop3_user, 124 ngx_pop3_user,
123 ngx_pop3_passwd 125 ngx_pop3_passwd,
126 ngx_pop3_auth_login_username,
127 ngx_pop3_auth_login_password,
128 ngx_pop3_auth_plain,
129 ngx_pop3_auth_cram_md5
124 } ngx_po3_state_e; 130 } ngx_po3_state_e;
125 131
126 132
127 typedef struct { 133 typedef struct {
128 ngx_peer_connection_t upstream; 134 ngx_peer_connection_t upstream;
151 unsigned protocol:1; 157 unsigned protocol:1;
152 unsigned quoted:1; 158 unsigned quoted:1;
153 unsigned backslash:1; 159 unsigned backslash:1;
154 unsigned no_sync_literal:1; 160 unsigned no_sync_literal:1;
155 unsigned starttls:1; 161 unsigned starttls:1;
156 unsigned auth_method:1; 162 unsigned auth_method:2;
157 163
158 ngx_str_t login; 164 ngx_str_t login;
159 ngx_str_t passwd; 165 ngx_str_t passwd;
160 166
161 ngx_str_t salt; 167 ngx_str_t salt;
190 #define NGX_POP3_CAPA 3 196 #define NGX_POP3_CAPA 3
191 #define NGX_POP3_QUIT 4 197 #define NGX_POP3_QUIT 4
192 #define NGX_POP3_NOOP 5 198 #define NGX_POP3_NOOP 5
193 #define NGX_POP3_STLS 6 199 #define NGX_POP3_STLS 6
194 #define NGX_POP3_APOP 7 200 #define NGX_POP3_APOP 7
195 #define NGX_POP3_STAT 8 201 #define NGX_POP3_AUTH 8
196 #define NGX_POP3_LIST 9 202 #define NGX_POP3_STAT 9
197 #define NGX_POP3_RETR 10 203 #define NGX_POP3_LIST 10
198 #define NGX_POP3_DELE 11 204 #define NGX_POP3_RETR 11
199 #define NGX_POP3_RSET 12 205 #define NGX_POP3_DELE 12
200 #define NGX_POP3_TOP 13 206 #define NGX_POP3_RSET 13
201 #define NGX_POP3_UIDL 14 207 #define NGX_POP3_TOP 14
208 #define NGX_POP3_UIDL 15
202 209
203 210
204 #define NGX_IMAP_LOGIN 1 211 #define NGX_IMAP_LOGIN 1
205 #define NGX_IMAP_LOGOUT 2 212 #define NGX_IMAP_LOGOUT 2
206 #define NGX_IMAP_CAPABILITY 3 213 #define NGX_IMAP_CAPABILITY 3
208 #define NGX_IMAP_STARTTLS 5 215 #define NGX_IMAP_STARTTLS 5
209 216
210 #define NGX_IMAP_NEXT 6 217 #define NGX_IMAP_NEXT 6
211 218
212 219
213 #define NGX_IMAP_AUTH_PLAIN 0 220 #define NGX_IMAP_AUTH_PLAIN 0
214 #define NGX_IMAP_AUTH_APOP 1 221 #define NGX_IMAP_AUTH_APOP 1
215 222 #define NGX_IMAP_AUTH_CRAM_MD5 2
216 223
217 #define NGX_IMAP_AUTH_PLAIN_ENABLED 0x0002 224
218 #define NGX_IMAP_AUTH_APOP_ENABLED 0x0004 225 #define NGX_IMAP_AUTH_PLAIN_ENABLED 0x0002
226 #define NGX_IMAP_AUTH_APOP_ENABLED 0x0004
227 #define NGX_IMAP_AUTH_CRAM_MD5_ENABLED 0x0008
219 228
220 229
221 #define NGX_IMAP_PARSE_INVALID_COMMAND 20 230 #define NGX_IMAP_PARSE_INVALID_COMMAND 20
222 231
223 232