Welcome! Log In Create A New Profile

Advanced

How to make nginx mail auth connection persistent?

Prabhash Rathore
May 16, 2017 02:20PM
Hello,

We are using nginx 1.7.3 as a reverse proxy for our Mail SMTP service. For
authentication of each SMTP connection, we have configured nginx to connect
with a http based service for authentication. Here is a snippet of our
nginx config:

mail {
# auth_server
auth_http auth_host:auth_port/authserver;

# mail server
server {
protocol smtp;
listen 25;
proxy on;
xclient on;
timeout 15;
starttls on;
... other configs...
}
}

With above config, we notice that nginx closes the connection after every
auth request/response to Mail Authentication Server (auth_http
auth_host:auth_port/authserver;) based on tcpdump analysis. We would like
to make this connection persistent so that we could reuse connection for
multiple auth requests.

I looked at nginx mail auth module documentation (
http://nginx.org/en/docs/mail/ngx_mail_auth_http_module.html#auth_http_header
) but I don't see any directive to make mail auth connection persistent.

I also looked at ngx_http_upstream_module (
http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive)
which has "keepalive" directive but my understanding is this directive is
for http upstream server not for mail auth server.

Can someone please help? Thanks!
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

How to make nginx mail auth connection persistent?

Prabhash Rathore 422 May 16, 2017 02:20PM

Re: How to make nginx mail auth connection persistent?

Maxim Dounin 197 May 16, 2017 02:28PM

Re: How to make nginx mail auth connection persistent?

Prabhash Rathore 248 May 16, 2017 05:30PM

Re: How to make nginx mail auth connection persistent?

Prabhash Rathore 498 May 17, 2017 01:34AM

Re: How to make nginx mail auth connection persistent?

Maxim Dounin 221 May 17, 2017 11:32AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 249
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