stalwartlabs / mail-server

Secure & Modern All-in-One Mail Server (IMAP, JMAP, POP3, SMTP)
https://stalw.art
3.53k stars 135 forks source link

[enhancement]: Enable PROXY protocol for specific port #557

Closed GoodLucky777 closed 5 days ago

GoodLucky777 commented 5 days ago

Which feature or improvement would you like to request?

I'd like to see this feature: Way to enable PROXY protocol for specific port and disable it for others.

Is your feature request related to a problem?

I want to use PROXY protocol for specific port like 25 and don't want to use in HTTPS port. However when I disable default server proxy protocol config, although I set override proxy settings for specific port, it seems the PROXY protocol is not enabled.

Code of Conduct

mdecimus commented 5 days ago

This is already possible. You can enable the proxy protocol only for certain listeners.

GoodLucky777 commented 5 days ago

This is already possible. You can enable the proxy protocol only for certain listeners.

When I set server.proxy.trusted-networks = "10.0.0.0/16" and server.listener.https.proxy.override = false, HTTPS port only accept PROXY protocol. How can I disable it?

mdecimus commented 4 days ago

You should do it like this, for example to enable the proxy protocol only on the https listener:

server.listener.https.proxy.trusted-networks = "10.0.0.0/16
server.listener.https.proxy.override = true