Simple SMTP proxy without an auth (pass AUTH command to backend)

kay nginx-forum at
Tue Sep 29 15:24:14 UTC 2020

I'd like to use nginx to serve TLS and/or StartTLS connections only, the
rest must be "proxy passed" without a modification to the backend.

Unfortunately I noticed
topic, where Maxim Dounin mentioned that it is impossible. That was 10 years
ago, probably now the situation is changed? Is there an option, which I can
use to pass the AUTH command?

P.S. Side question, I'd like to use a hostname in Auth-Server header:

location = /mail/auth {
    add_header Auth-Status OK;
    add_header Auth-Server hostname;
    add_header Auth-Port   8025;
    return 204;

but nginx doesn't allow to do this. Is there an option or a workaround for

Posted at Nginx Forum:,289589,289589#msg-289589

More information about the nginx mailing list