On 25/10/2021 11:35, Vincent Pelletier wrote:
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.
As a categorical prevention of postfix using the wrong ip address until
you found the correct postfix configuration, you could block all
outgoing smtp from the wrong ip address:
iptables -A OUTPUT -p tcp --dport 25 ! -s <ip> -j DROP
(quote the ! when entering via bash, and co-align with all the other
rules in your iptables).