Forum: NGINX nginx mail starttls ip based

Posted by Marco (Guest)
on 2012-12-11 11:47
(Received via mailing list)
Hello,

 I'm new in nginx world. I would like to configure a single nginx server
to proxy imap/pop servers with starttls option.

I would like that the "starttls" could be "on" on a list of known safe 
IPs
and "only" on other IPs. Using the same listen port and protocol.

Could you tell me how to achieve this?
Maybe, is there a way to set the starttls in auth phase?

For instance, let suppose  I have configured this:

  server {
    listen     110;
    protocol   pop3;
    starttls   on;
    proxy      on;
  }

  server {
    listen     110;
    protocol   pop3;
    starttls    only;
    proxy       on;
  }

I would select first or second server block using Client-IP header.
Is it possible?

Thanks a lot.
Best Regards
Marco
Posted by Maxim Dounin (Guest)
on 2012-12-11 13:31
(Received via mailing list)
Hello!

On Tue, Dec 11, 2012 at 10:14:05AM +0000, Marco wrote:

>
>     listen     110;
>     protocol   pop3;
>     starttls    only;
>     proxy       on;
>   }
>
> I would select first or second server block using Client-IP header.
> Is it possible?

No.  Either use "starttls only" for all clients, or configure
different servers on different ip addresses/ports.

--
Maxim Dounin
http://nginx.com/support.html
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.