My mail server (sendmail) has a bridged DSL connection running PPPoE to the outside world.
The network interface is initially assigned an IP address for my domain, but when PPPoE starts the IP address is forced to one from my ISP which is not in my domain, and I have no control over it or its reverse-dns.
This IP addr is the one which appears in the envelope for outgoing mail; e.g., outgoing mail is received with a header that looks like:
from mailhost.my-domain.com ([56.99.126.37]) by ...
Is there any way to have sendmail use the "real" IP of the host instead of the 56.99.126.37 assigned by my ISP to the interface? MASQUERADE_AS affects the domain name, but I don't see a way to force the IP address. Is that set at the IP level below sendmail and out of sendmail's control?
I have an SPF record which includes +ip4:56.99.126.37 so mostly this is not a problem, but att and abusix.com still complain because a reverse dns doesn't map to my domain.
The routing table, after modification when PPPoE starts, looks like:
Destination Gateway Flags Netif Expire
default 59.41.70.25 US tun0
56.99.126.37 link#4 UHS lo0
56.99.131.56/29 link#1 U xl0
56.99.131.57 link#1 UHS lo0
59.41.70.25 link#4 UHS tun0
127.0.0.1 link#3 UH lo0
192.168.0.0/25 link#2 U fxp0
192.168.0.1 link#2 UHS lo0
The desired IP, and the original default route, were for 56.99.131.57 out xl0. ifconfig tun0 looks like:
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1492
options=80000<LINKSTATE>
inet 56.99.126.37 --> 59.41.70.25 netmask 0xffffffff
groups: tun