Trying to use SMTP proxy, but there might be limitations?

Maxim Dounin mdounin at mdounin.ru
Mon Sep 21 13:44:20 UTC 2015


Hello!

On Mon, Sep 21, 2015 at 12:51:17PM +0100, Francis Daly wrote:

> On Sun, Sep 20, 2015 at 05:25:26PM -0700, Michael Shadle wrote:

[...]

> > I examined $_SERVER in PHP:
> > 
> >     [HTTP_AUTH_SMTP_FROM] => MAIL FROM:<from at address.com> SIZE=418
> >     [HTTP_AUTH_SMTP_TO] => RCPT TO:<destination at address.com>
> > ORCPT=rfc822;destination at address.com
> 
> Do you want *that* address to be delivered to? If so, "Auth-Status: OK".
> 
> After you do that, you should get another request for the next address
> (I think).

No, this isn't how it works.  With "smtp_auth none;" only the 
first MAIL FROM with the fist RCPT TO is passed to the auth 
script.  Once it responds with "Auth-Status: OK", the connection 
is passed to a smtp backend returned, and an opaque pipe is 
established - that is, more recipient addresses can be passed 
there, and even more messages.  The backend is expected to be 
properly configured to do actual recipient checking itself.  What 
nginx smtp proxy layer does is initial filtering - whether we are 
willing to talk to this client, or not at all.

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



More information about the nginx mailing list