rewritten upstream
diff --git a/src/imap/ngx_imap_auth_http_module.c b/src/imap/ngx_imap_auth_http_module.c
index e1518b8..668a952 100644
--- a/src/imap/ngx_imap_auth_http_module.c
+++ b/src/imap/ngx_imap_auth_http_module.c
@@ -1291,7 +1291,7 @@
     ngx_memzero(&u, sizeof(ngx_url_t));
 
     u.url = value[1];
-    u.default_portn = 80;
+    u.default_port = 80;
     u.uri_part = 1;
     u.one_addr = 1;
 
@@ -1304,7 +1304,7 @@
 
     ahcf->peer = u.addrs;
 
-    ahcf->host_header = u.host_header;
+    ahcf->host_header = u.host;
     ahcf->uri = u.uri;
 
     if (ahcf->uri.len == 0) {
diff --git a/src/imap/ngx_imap_core_module.c b/src/imap/ngx_imap_core_module.c
index 3cd3991..99aa9cc 100644
--- a/src/imap/ngx_imap_core_module.c
+++ b/src/imap/ngx_imap_core_module.c
@@ -541,7 +541,7 @@
 
     for (i = 0; i < cmcf->listen.nelts; i++) {
 
-        if (imls[i].addr != u.addr.in_addr || imls[i].port != u.portn) {
+        if (imls[i].addr != u.addr.in_addr || imls[i].port != u.port) {
             continue;
         }
 
@@ -558,7 +558,7 @@
     ngx_memzero(imls, sizeof(ngx_imap_listen_t));
 
     imls->addr = u.addr.in_addr;
-    imls->port = u.portn;
+    imls->port = u.port;
     imls->family = AF_INET;
     imls->ctx = cf->ctx;