User Tools

Site Tools


nginx_smtp_proxy

Howto use NGINX to Create an SMTP/IMAP Proxy


  • Add in the NGINX.conf
stream { include /etc/nginx/streams/*; }
  • create /etc/nginx/streams
mkdir -p /etc/ngninx/streams
  • Add the Stream Data in /etc/nginx/streams/mail_proxy.conf
server { \\
listen [::]:25 ipv6only=off; \\
listen [::]:143 ipv6only=off; \\
listen [::]:587 ipv6only=off; \\
listen [::]:993 ipv6only=off; \\
proxy_pass 10.11.12.13:$server_port; \\
proxy_protocol on; \\
}

This will PROXY it directly to 10.11.12.13 where the Server_Port will be automatically selected. WITHOUT the dazzle of http auth

nginx_smtp_proxy.txt · Last modified: by 127.0.0.1