In a VPS with 2 IPv4
and 16 IPv6
, I send emails with postfix
. Each time, the email is sent from one of the IPs randomly
Received: from domain.com (a random IPv6 out of my 16 IPv6)
Thus, SPF
fails (of course, softfail), as the originating IP is not in my DNS record. I can set a range of IP in DNS's SPF record, but how can I tell postfix to submit email from the main IP (the one I set rDNS)?
There are two options available for binding smtp client to particular IPs/IPv6s (man 5 postconf):
smtp_bind_address
smtp_bind_address6
I think they are pretty self-descriptive. Just make sure that related NICs/IPs are defined by
inet_interfaces
option.By the way, SPF records support multiple originating IP addresses per domain. Try to generate it with this SPF wizard. Just a quick example: