Hello all,

So one thing I'm having issues to wrap my head around are rtables/domains... I
have a VPS on Digital Ocean and they have a set up with a public IP address + a
"floating" one which is accessed through another IP address on the same
interface. Eg.

vio0: flags....
....
inet $publicIP
inet 10.10.10.10 (giving access to a gateway nating traffic to another IP 
address)

All traffic is routed to the gateway associated with the 10.10.10.10 address.
That gateway does not accept SMTP traffic which needs to be routed through the
gateway associated to the public IP (let's call it pubGW)

So, I created a 2nd routing table in rdomain 0: route -T1 add default $pubGW
and then move smtpd to it, rcctl set smtpd rtable 1, rcctl restart smtpd.
Output of netstat -R below:
Rdomain 0
  Interfaces: lo0 vio0 enc0 pflog0
  Routing tables: 0 1

This does not work, smtpd reports DNS failures:
smtpd[35722]: smtp-out: Failed to resolve MX for
[relay:xxx,port=xxx,smtps,auth=secrets:label,mx]: Host not found

The setup works on the rtable 0 (when I swap the default route) and route -T1
exec ping google.com works as well (so ping apparently can resolve names on
rtable 1...). What am I missing?

On another note, I cannot get .forward to work for root. I checked the
permissions and they are as mentioned on man forward. I don't try to pipe or
:include:, just /path/to/file (this works with only an email address). 
/path/to/file  works with a normal
user and with root gives: sendmail: command failed: 451 Temporary failure:
<r...@host.my.domain>. Is that a security thing?

Thanks a lot in advance,

Thomas

Reply via email to