One of my websites sends emails from various sources including:
- Mailchimp
- Mandrill
- Mailgun
- Amazon SES
- From the server itself
We have correctly configured SPF & DKIM settings for all of the sources so we decided to add DMARC too and at the same time we changed ?all to -all.
All of our emails have been going through just fine but we've noticed our Mailchimp emails are "SPF Incapable" and as such don't fully pass.
Most email clients / accounts show that DMARC has passed, however DMARCian & a few email clients throw up DMARC Fail-alignment
For example:
DMARC.io does however say the following:
SPF: SPF is not possible as MailChimp uses their own domain in the bounce address. Their domain authentication verification tool requires including Mailchimp, though. To work-around this without having to include Mailchimp servers, try including only 'ip4:205.201.128.0/20 ip4:198.2.128.0/18 ip4:148.105.8.0/21' in your SPF record.
So, I added those to my SPF however it still shows:
All of the following IP's are all covered by those CIDR notations so I am unable to work out why the SPF is still misaligned for SPF, but it fixes DKIM...
198.2.185.161
198.2.185.245
198.2.141.4
198.2.175.233
198.2.185.245
198.2.142.122
I did find the following on stackoverflow: https://mcmap.net/q/1149408/-dmarc-spf-configuration-error however that seems to be slightly wrong in advice because the bounce server is nearly always different. They've got hundreds of servers.
My SPF looks like:
v=spf1 +a +mx +ip4:94.237.30.75 +ip4:94.237.30.85 +ip4:94.237.30.86 +ip4:94.237.30.87 +ip4:54.77.177.67 +ip4:34.246.233.211 +ip4:52.18.62.128 +ip4:34.241.119.225 +ip4:205.201.128.0/20 +ip4:198.2.128.0/18 +ip4:148.105.8.0/21 include:servers.mcsv.net include:spf.mandrillapp.com include:mailgun.org include:amazonses.com -all
What have I done wrong/can I improve in order to get the SPF aligned?
On a side note, I assume for the first 4 IP's I could just use: +ip4:94.237.30.75/28
which would include those 4 IP's as well as a 14 or so other IP's which isn't really that risky is it especially when they won't have DKIM and as a result DMARC passing? To make it a little more secure I could just reduce those 4 records down to +ip4:94.237.30.75 +ip4:94.237.30.85/30
which would only include 1 IP that we don't use.
I do also want to send emails via EC2, rather than SES for some emails (potentially to replace Mailgun/SES) however when we send emails from those servers they get sent to spam for not having a reverse DNS.
I assume, the fix for that would be to request a PTR record to be setup by Amazon for the 3x EC2 instances that we use?
I did request one of these before, but I wasn't sure if it is supposed to be pointing to my main website's IP or the IP of the server that it's sending the emails from...
As for SES, even after adding the SPF include and the DKIM record, our SPF record shows "Neutral" rather than "Pass" for example the following is from the "Test Email" feature for SES/EC2
SPF: NEUTRAL with IP 54.240.7.46
So to recap...
- How do we make Mailchimp fully pass on SPF so that DMARC is aligned
- How do we correctly setup a PTR record for a reverse dns, should the subdomain be pointing to the server it sent the email from or the server of the main domain?
- How do I get Amazon SES to throw a SPF Pass, rather than SPF Neutral?
54.77.177.67
and the domain of that server istesting.website.com
the PTR should point totesting.website.com
NOTwebsite.com
Re 3: I did indeed setup a mail from and no the SPF isn't being cut. Re 4: I forgot to ask about my assumption on the first 4 ips in my SPF, about how should I consolidate them down – Lag