I'm trying to set up Postfix in Ubuntu Server 20.04 as an email sender (I don't need to receive emails) in my subdomain server.
I have the main domain that works with one server, and a subdomain that works with another server (with a different public IP). To better understand, this is the DNS setup:
- mydomain.com, (type) A, IP 185.xx.xxx.xxx
- subdom.mydomain.com, (type) A, IP 87.xx.xx.xxx (this is an home server)
I'm trying to configure the SPF on my DynamicDNS provider panel like this (DNS name are resolved by a DDNS provider):
- subdom.mydomain.com, (type) TXT, IP 87.xx.xx.xxx, v=spf1 a include:subdom.mydomain.com -all
I already configured SSL certificate for subdom.mydomain.com, but every email that I send will be received in the spam folder with error:
"spf=neutral google.com: 87.xx.xx.xxx is neither permitted nor denied by best guess record for domain of [email protected]"
How can I fix my SPF to avoid that all email will be marked as spam?
Thank you