Welcome! Log In Create A New Profile

Advanced

How to setup a secure authentication server for a Mail Proxy Server

Posted by actionmystique 
How to setup a secure authentication server for a Mail Proxy Server
August 23, 2022 12:08PM
I'm trying to configure NGINX as a Mail Proxy Server using this example: https://docs.nginx.com/nginx/admin-guide/mail-proxy/mail-proxy/

I came up with this configuration:

mail
{
server_name mail.example.com;

ssl on;
starttls on;
include ssl_settings;

server
{
listen 25;
smtp_auth plain;
# Enables user authentication on the SMTP backend using the AUTH command instead of using the authentication server
proxy_smtp_auth on
server_name smtp.example.com
}

server
{
listen 143;
imap_auth plain;
# Authentication server
auth_http localhost:8080/cgi-bin/nginxauth.cgi;
server_name imap.example.com
}
}
(I don't know how to make the indentation appear correctly as code)

I'm using "proxy_smtp_auth" for SMTP to directly use the SMTP backend authentication mechanism.
I seems that there is no "proxy_imap_auth" to directly use the IMAP backend authentication mechanism.

So I configured "cgi-bin/nginxauth.cgi".instead but I have no idea what its contents should be.

Any suggestion?
Re: How to setup a secure authentication server for a Mail Proxy Server
August 24, 2022 06:29AM
I just need nginxauth.cgi to hand over the authentication process to the imap backend.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 285
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready