Configuring KumoMTA with Multiple Public IPs on Proxy Server

Problem Statement:

I have a server with multiple public IP addresses configured, and I am using KumoMTA to send emails through kumoproxy. On the proxy server, I have configured multiple instances of the proxy server to listen on different internal IP addresses, each corresponding to a public IP address. However, when emails are sent, the IP pool rotates inside the KumoMTA server, but the final sending IP address from the four public-facing IPs on the proxy server is always the same (IP1). With the same KumoMTA configuration, changing the proxy server IP to a single IP per proxy server works as expected, but using multiple IPs on the proxy server does not.
Current Configuration:
Proxy Server Commands:

bash

/opt/kumomta/sbin/proxy-server --listen 10.0.1.1:5000 &
/opt/kumomta/sbin/proxy-server --listen 10.0.1.2:5000 &
/opt/kumomta/sbin/proxy-server --listen 10.0.1.3:5000 &
/opt/kumomta/sbin/proxy-server --listen 10.0.1.4:5000 &

Issue Description:

Despite configuring multiple proxy server instances to listen on different internal IP addresses, the final sending IP from the four public-facing IPs on the proxy server is always the same (IP1). When configuring one IP per proxy server, the setup works as expected.

Hey there @original-jellyfish, thanks for posting. Please read the “Troubleshooting” and “How to Ask for Help” buttons below. If you would like a 1:1 support session from the KumoMTA team, details are at the “Book a Support Session” button below.

You may be overthinking this. KumoProxy can route to any public IP plumbed on the server so you only need to install it once.

In your sources.toml (or manually)

name = ‘ip-1’,

  -- The SOCKS5 proxy server address and port
  socks5_proxy_server = '10.0.1.1:5000',

  -- Used by the SOCKS5 proxy server to connect to the destination address
  socks5_proxy_source_address = '200.100.50.1',

  ehlo_domain = 'mta1.examplecorp.com',
}

this is the sources.toml

[source."ip-1"]
socks5_proxy_server = '10.0.1.1:5000'
socks5_proxy_source_address = '10.0.1.1'
ehlo_domain = 'r17.domain1.com'

[source."ip-2"]
socks5_proxy_server = '10.0.1.2:5000'
socks5_proxy_source_address = '10.0.1.2'
ehlo_domain = 'r18.domain1.com'

[source."ip-3"]
socks5_proxy_server = '10.0.1.3:5000'
socks5_proxy_source_address = '10.0.1.3'
ehlo_domain = 'r19.domain2.com'

[source."ip-4"]
socks5_proxy_server = '10.0.1.4:5000'
socks5_proxy_source_address = '10.0.1.4'
ehlo_domain = 'r192.domain2.com'

[pool."domain1-com-pool"]
[pool."domain1-com-pool"."ip-1"]
weight = 1
[pool."domain1-com-pool"."ip-2"]
weight = 1

[pool."domain2-com-pool"]
[pool."domain2-com-pool"."ip-3"]
weight = 1
[pool."domain2-com-pool"."ip-4"]
weight = 1

I tried it this way , and the behavior is I can see the routing happening correctly inside the server but in the proxy server

I tried it with config also

[source."ip-1"]
socks5_proxy_server = '10.0.1.1:5000'
socks5_proxy_source_address = '10.0.1.1'
ehlo_domain = 'r17.domain1.com'

[source."ip-2"]
socks5_proxy_server = '10.0.1.1:5000'
socks5_proxy_source_address = '10.0.1.2'
ehlo_domain = 'r18.domain1.com'

[source."ip-3"]
socks5_proxy_server = '10.0.1.1:5000'
socks5_proxy_source_address = '10.0.1.3'
ehlo_domain = 'r19.domain2.com'

[source."ip-4"]
socks5_proxy_server = '10.0.1.1:5000'
socks5_proxy_source_address = '10.0.1.4'
ehlo_domain = 'r192.domain2.com'

[pool."domain1-com-pool"]
[pool."domain1-com-pool"."ip-1"]
weight = 1
[pool."domain1-com-pool"."ip-2"]
weight = 1

[pool."domain2-com-pool"]
[pool."domain2-com-pool"."ip-3"]
weight = 1
[pool."domain2-com-pool"."ip-4"]
weight = 1

changes in socks5_proxy_server = ‘10.0.1.1:5000’ only

still same behaviour

What release? There have been recent fixes for kproxy.

kumod 2023.12.28-63cde9c7

this is the version

Move to KumoMTA-dev and update

will test it out and update the result