nginx-0.1.44-RELEASE import

    *) Feature: the IMAP/POP3 proxy supports SSL.

    *) Feature: the "proxy_timeout" directive of the ngx_imap_proxy_module.

    *) Feature: the "userid_mark" directive.

    *) Feature: the $remote_user variable value is determined independently
       of authorization use.
diff --git a/auto/modules b/auto/modules
index dccb7a7..606149a 100644
--- a/auto/modules
+++ b/auto/modules
@@ -228,6 +228,14 @@
 if [ $IMAP = YES ]; then
     modules="$modules $IMAP_MODULES"
 
+    if [ $IMAP_SSL = YES ]; then
+        modules="$modules $IMAP_SSL_MODULE"
+        IMAP_DEPS="$IMAP_DEPS $IMAP_SSL_DEPS"
+        IMAP_SRCS="$IMAP_SRCS $IMAP_SSL_SRCS"
+        have=NGX_IMAP_SSL . auto/have
+        USE_OPENSSL=YES
+    fi
+
     modules="$modules $IMAP_AUTH_HTTP_MODULE"
     IMAP_SRCS="$IMAP_SRCS $IMAP_AUTH_HTTP_SRCS"