Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Imap proxy doesn't work

$
0
0
Hello!

Start using nginx as smtp/imap proxy.

Smtp proxy works (but on the real smtp server I have to allow redirects from nginx IP).

Problem is IMAP proxy. It doesn't works at all. No differ - SSL or Startssl. Mail client - Thunderbird.

I run nginx on CentOS 7, IP:1.2.3.4, ports 25,143,993.
Target IMAP: outlook.office365.com.
If directly connect (no nginx), Thunderbird works fine with IMAP outlook.office365.com, SSL/TLS, port 993.
Via nginx nothing happens (IMAP: 1.2.3.4, SSL/TLS, port 993 or STARTTLS/143).
Thunderbird says: server 1.2.3.4 has disconnected. The server may have gone down...

Nginx mail config:

mail {
server_name 1.2.3.4;
auth_http 127.0.0.1:80/auth;

xclient off;

proxy_pass_error_message on;

ssl on;
ssl_prefer_server_ciphers on;
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;

imap_capabilities "IMAP4rev1" "UIDPLUS" "IDLE" "LITERAL+" "QUOTA";
smtp_capabilities "SIZE 10485760" "ENHANCEDSTATUSCODES" "8BITMIME" "DSN";

server {
listen 25;
protocol smtp;
smtp_auth login plain cram-md5;
}

server {
listen 993;
protocol imap;
imap_auth login plain cram-md5;
}

server {
listen 143;
protocol imap;
imap_auth login plain cram-md5;
}
}

There are no errors in /var/log/nginx/error.log.

How to trace where is the issue?

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>