From 7f7846d8208c9179b7632eddc4a3165b3b10afbb Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 26 Apr 2006 09:52:47 +0000 Subject: nginx-0.3.42-RELEASE import *) Feature: the "bind" option of the "listen" directive in IMAP/POP3 proxy. *) Bugfix: if the same capture in the "rewrite" directive was used more then once. *) Bugfix: the $sent_http_content_type, $sent_http_content_length, $sent_http_last_modified, $sent_http_connection, $sent_http_keep_alive, and $sent_http_transfer_encoding variables were not written to access log. *) Bugfix: the $sent_http_cache_control returned value of the single "Cache-Control" response header line. --- src/imap/ngx_imap.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) (limited to 'src/imap/ngx_imap.h') diff --git a/src/imap/ngx_imap.h b/src/imap/ngx_imap.h index 90375bfb2..e4928be55 100644 --- a/src/imap/ngx_imap.h +++ b/src/imap/ngx_imap.h @@ -26,7 +26,46 @@ typedef struct { typedef struct { - ngx_array_t servers; /* ngx_imap_core_srv_conf_t */ + in_addr_t addr; + in_port_t port; + int family; + + /* server ctx */ + ngx_imap_conf_ctx_t *ctx; + + unsigned bind:1; +} ngx_imap_listen_t; + + +typedef struct { + in_addr_t addr; + ngx_imap_conf_ctx_t *ctx; + ngx_str_t addr_text; +} ngx_imap_in_addr_t; + + +typedef struct { + ngx_imap_in_addr_t *addrs; /* array of ngx_imap_in_addr_t */ + ngx_uint_t naddrs; +} ngx_imap_in_port_t; + + +typedef struct { + in_port_t port; + ngx_array_t addrs; /* array of ngx_imap_conf_in_addr_t */ +} ngx_imap_conf_in_port_t; + + +typedef struct { + in_addr_t addr; + ngx_imap_conf_ctx_t *ctx; + unsigned bind:1; +} ngx_imap_conf_in_addr_t; + + +typedef struct { + ngx_array_t servers; /* ngx_imap_core_srv_conf_t */ + ngx_array_t listen; /* ngx_imap_listen_t */ } ngx_imap_core_main_conf_t; @@ -52,7 +91,7 @@ typedef struct { ngx_array_t imap_capabilities; /* server ctx */ - ngx_imap_conf_ctx_t *ctx; + ngx_imap_conf_ctx_t *ctx; } ngx_imap_core_srv_conf_t; @@ -109,6 +148,7 @@ typedef struct { unsigned quoted:1; unsigned backslash:1; unsigned no_sync_literal:1; + unsigned starttls:1; ngx_str_t login; ngx_str_t passwd; @@ -116,6 +156,8 @@ typedef struct { ngx_str_t tag; ngx_str_t tagged_line; + ngx_str_t *addr_text; + ngx_uint_t command; ngx_array_t args; @@ -184,6 +226,9 @@ typedef struct { (s)->main_conf[module.ctx_index] #define ngx_imap_get_module_srv_conf(s, module) (s)->srv_conf[module.ctx_index] +#define ngx_imap_conf_get_module_main_conf(cf, module) \ + ((ngx_imap_conf_ctx_t *) cf->ctx)->main_conf[module.ctx_index] + void ngx_imap_init_connection(ngx_connection_t *c); void ngx_imap_send(ngx_event_t *wev); -- cgit