SPF Record Validation Problem.
Hi,
I have added domain postal.mydomain.com in the configuration file, the SPF record which postal suggest in the domain configuration is given below, so when I add record like this in the DNS of the domain Postal verifies the record but when i send email different ISP's like Gmail, outlook and mail-tester.com fails the SPF record.
v=spf1 a mx include:spf.postal.mydomain.com ~all
When I add SPF record including the IP address of the server, Postal fails the verification but ISP's verifies the record not sure what's going on.
Could you please help how I can add correct SPF record for my domain.
v=spf1 a mx ip4:xxx.xxx.xxx.xxx ~all
Thanks.
You need to add SPF record for the subdomain spf.postal.mydomain.com such that it includes your Postal IPs.
Then add another SPF record for your sending domain to include "spf.postal.mydomain.com".
Still having the same issue, this is what mail-tester shows.

My understanding based on screenshot suggests your psrp.yourdomain.com does not have SPF record. The psrp.yourdomain.com should be a CNAME to rp.postal.yourdomain.com. You should add Postal IPs to SPF record of rp.postal.yourdomain.com.
See Return Path section on the DNS configuration wiki
That worked for me :) Thanks so much!
Great. Glad to hear.
Hi I have an issue related to this.
I have a server with 2 IP addresses, x.x.x.1 and x.x.x.2
.yml file is updated with Return Path as rp.mail.service-provider.com
On IP-1, I have setup a Client-1.com, which is tested OK by postal and is doing fine.
On IP-2, there is Client-2.com. Also tested OK by postal but gmail etc. mark it as spam due to SPF error.
SPF: | PERMERROR with IP x.x.x.2 spf=permerror (google.com: permanent error in processing during lookup of [email protected]: mail.service-provider.com not found) client-ip=x.x.x.2 ;
It seems my YML file has RP set with IP-1, and gmail finds client-2.com coming from IP-2
I am totally confused. Please help. A sample running file from someone will be helpful.
Rgds...
It's difficult to troubleshoot this way. If you can share your domain and it's SPF output. Also, you can share your config too. Mask out important info you don't want to be public.
Use dig, nslookup, host or site like mxtoolbox [dot] com