Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4832

HAProxy Email SOurce Address Issue - Maybe

$
0
0

Hi All,

I’ve got a problem that has HAProxy in the mix, but I don’t know if it’s a HAProxy issue or something else - yes, I’m flying a little bit in the dark here groping around for at least the trail to a possible solution (ie sorry if this isn’t a HAProxy issue).

The Situation: Our Gateway Router (GR) has an internal address of 192.168.1.1. There is an Email (Postfix) server (ES) on the internal network. Email gets routed from the GR to a HAProxy box (HAP) which then forwards the email to the ES. We are receiving and sending Email AOK.

The issue is that the ES is reporting all mail as coming from 192.168.1.1, not the actual IP Address of the EMail source. This means that things like SPF can’t be checked for. The relevant HAProxy config is:

defaults defaults_common
  log global
  option dontlognull
  option redispatch
  option tcp-smart-connect
  timeout client 1m
  timeout connect 10s
  timeout queue 30s
  timeout server 1m
  timeout tarpit 10s
  mode tcp
  balance leastconn
  option tcplog
  tcp-check connect

frontend frontend_mail_smtp from defaults_tcp
  bind *:25
  tcp-request content track-sc0 src table table_per_ip_connections
  tcp-request inspect-delay 10s
  use_backend backend_mail_smtp

backend table_per_ip_connections
  stick-table type ip size 512k expire 1m store conn_cur,conn_rate(1m)

backend backend_mail_smtp from defaults_tcp
  server mail mx01.mjb.pri:60025 send-proxy-v2

What I suspect is happening (ie I’m assuming) that HAProxy is rewritting the Email source IP Address with the GR’s IP Address - but as I said, that’s an assumption and I could be radically wrong.

So, can someone/anyone please point me in the correct direction - up to an including “This is not a HAProxy issue so look elsewhere”?

Thanks

Dulux-Oz

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4832

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>