Hello,

I have a server with multiple IPv4 routes to the internet (multipath
over tunnels, plus the default route). The multipath route is picked for
outgoing connections based on the IP the client socket is bound to:
  ip rule from <ip> lookup <table>
  ip route add table <table> default nexthop via ... [nexthop via ... [...]]

I have setup postfix to bind to <ip> for some emails that should appear
as having entered the net from the ends of the multipath route (because
these IPs are in SPF records).

I did a mistake and accidentally removed <ip> from that system. Postfix
complains (rightly) in the logs that it cannot bind to this address:
  postfix/smtp: warning: smtp_connect_addr: bind <ip>: Cannot assign requested 
address

But then, it proceeded to send the email anyway, so it entered the
internet from the main default route. This made some recipients' SMTP
servers unhappy, which delayed some emails, but others continued to
accept the mails (and could have done all sort of bad things to them,
like file them in a spam box, ...).

The custom postfix settings I have for this setup are:
  smtp_address_preference = ipv4
  smtp_bind_address = <ip>
I am on postfix 3.4.14 (Debian oldstable).

I would rather postfix just stop sending emails altogether in such case,
than send them from an unexpected ip: a delay is preferable to me to
uncertainty as to how the emails were processed by recipient SMTPs.

Is there something else I should set so postfix stops falling back to
no binding ?

Regards,
-- 
Vincent Pelletier


Reply via email to