Maxim Dounin
December 30, 2015 10:06AM
Hello!

On Wed, Dec 30, 2015 at 08:20:27AM -0500, Cugar15 wrote:

> Well, here we go again... somehow, I'm not getting this smtp proxy to work
> with nginx.
> I moved to haproxy, and this combination works ok. Creating a tcp connection
> passes over to postfix
> and the postfix prompt is seen using a telnet connection - and all works
> just fine.
>
> However, I'd like to stick with nginx if possible....actually if possible at
> all!

If TCP proxying is enough in your case - you can consider
using stream proxy module instead, see here:

http://nginx.org/en/docs/stream/ngx_stream_core_module.html

> Here are my findings - and maybe somebody can help to confirm or disagree:
>
> 1) Xclient = on will basically bypass sals authorithation in postfix.
> Postfix/Sasl will assume that the message is already authenticated.
> All the auth login commands are basically exectuted

Yes. All information obtained by nginx is passed via the XCLIENT
command.

> 2) Xclient = off will not trigger any sals authentication in postfix.
> Somehow, it seems, that the credentials are not forwarded to postfix

Yes. Authentication is checked by auth_http script, and there is
no need to do additional authentication to SMTP backend. As long
as appropriate checks are done by auth_http, it's enough to allow
your nginx IP to submit mail.

If it's not enough in your particular setup (e.g., you want
correct "Received" headers to be added), enable XCLIENT.

> Is this really the expected behaviour?
> IMAP behaviour is completely different. Here the authentication works just
> fine...

Yes, that's expected.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

smtp proxy with postfix

Cugar15 December 18, 2015 02:08PM

Re: smtp proxy with postfix

Cugar15 December 19, 2015 08:43AM

Re: smtp proxy with postfix

Cugar15 December 19, 2015 11:41AM

Re: smtp proxy with postfix

B.R. December 19, 2015 11:46AM

Re: smtp proxy with postfix

Cugar15 December 19, 2015 01:37PM

Re: smtp proxy with postfix

itpp2012 December 19, 2015 01:46PM

Re: smtp proxy with postfix

Cugar15 December 19, 2015 03:30PM

Re: smtp proxy with postfix

itpp2012 December 19, 2015 03:49PM

Re: smtp proxy with postfix

Cugar15 December 19, 2015 04:17PM

Re: smtp proxy with postfix

itpp2012 December 19, 2015 05:29PM

Re: smtp proxy with postfix

Cugar15 December 20, 2015 12:09PM

Re: smtp proxy with postfix

Cugar15 December 20, 2015 02:00PM

Re: smtp proxy with postfix

Cugar15 December 30, 2015 08:20AM

Re: smtp proxy with postfix

Maxim Dounin December 30, 2015 10:06AM

Re: smtp proxy with postfix

Cugar15 December 30, 2015 10:49AM

Re: smtp proxy with postfix

Maxim Dounin December 30, 2015 10:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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