Re: [exim] How to make proxy support work in exim
Hi, Andrey via Exim-users (So 09 Okt 2022 17:39:39 CEST): > Nginx and Exim on the same host, Nginx runs as a smtp proxy for exim. > Nginx v1.22.0 config fragment: Despite the fact that I do not need to understand why you want to have the proxy on the same host (probably debugging/development purpose?), your config looks quite plausible. But never I used nginx as a proxy. I used haproxy. > ``` > (Exim v4.96, compiled with SUPPORT_PROXY). Exim config: > > ``` > hostlist hosts_proxy = <; 127.0.0.1; 192.46.111.11 > ``` There is no sense in defining a host list w/o using it. Defining a hostlist as above just creates a list of host items, named "hosts_proxy". This doesn't imply any use of the list. However, there is a main config option "hosts_proxy", which accepts a host list - that is, a list of host items, or a list that was defined as a host list previously: Given your config from above # referring to the hostlist "hosts_proxy" defined above hosts_proxy = +hosts_proxy or hosts_proxy = <; 127.0.0.1; 192.168.111.11 should work. Best regards from Dresden/Germany Viele Grüße aus Dresden Heiko Schlittermann -- SCHLITTERMANN.de internet & unix support - Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} - gnupg encrypted messages are welcome --- key ID: F69376CE - signature.asc Description: PGP signature -- ## List details at https://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
Re: [exim] How to make proxy support work in exim
Proxy protocol is an optional feature: if this: exim -bV | grep '\WPROXY\W' prints nothing you will need to install a more feature-rich build of exim. > ``` > hostlist hosts_proxy = <; 127.0.0.1; 192.46.111.11 > ``` > But PROXY protocol seems to be not recognised by exim loose the "hostlist" hosts_proxy = <; 127.0.0.1; 192.46.111.11 or use the host list explicitly hostlist hosts_proxy = <; 127.0.0.1; 192.46.111.11 hosts_proxy = +hosts_proxy https://www.exim.org/exim-html-current/doc/html/spec_html/ch-proxies.html -- Jasen. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
Re: [exim] How to make proxy support work in exim
On 09/10/2022 16:39, Andrey via Exim-users wrote: Nginx and Exim on the same host, Nginx runs as a smtp proxy for exim. How to make proxy support work in exim? Looking at the nginx docs pages I suspect that nginx is only being an smtp forwarding MTA, talking SMTP to the eventual destination and not proxy-protocol. If so, you must not configure your exim to expect proxy-protocol, and you'll have to remove from your config anything that depends on the source IP (and rDNS name corresponding), since that will always be the nginx system. -- Cheers, Jeremy -- ## List details at https://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
[exim] How to make proxy support work in exim
Hi Nginx and Exim on the same host, Nginx runs as a smtp proxy for exim. Nginx v1.22.0 config fragment: ``` mail { ... server { listen25; protocol smtp; proxy_protocol on; smtp_auth none; starttls on; } ... } ``` (Exim v4.96, compiled with SUPPORT_PROXY). Exim config: ``` hostlist hosts_proxy = <; 127.0.0.1; 192.46.111.11 ``` But PROXY protocol seems to be not recognised by exim, Exim logs: ``` SMTP syntax error in "PROXY TCP4 209.85.128.171 192.46.111.11 43960 25" H=localhost [127.0.0.1] unrecognized command ``` How to make proxy support work in exim? Thank you -- ## List details at https://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/