Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create both IPv4 and IPv6 SPF record [closed]

Tags:

Right now I have SPF IP4 and IP6 as two separate records, but IPv6 is not being recognized by Gmail. Should I merge them? It looks like this currently. How should it be configured?

  A   3600     0  78.46.138.249  MX   3600    10  mx.zohomail.com  MX   3600    20  mx2.zohomail.com  NS   3600     0  ns1.loopia.se  NS   3600     0  ns2.loopia.se TXT   3600     0  "v=spf1 ip4:78.46.138.249 ~all" TXT    300     0  "v=spf1 ip6:2a01:4f8:d16:1355::2 +all" 

GMail:

Received-SPF: softfail (google.com: domain of transitioning [email protected] does not designate 2a01:4f8:d16:1355::2 as permitted sender) client-ip=2a01:4f8:d16:1355::2; 
like image 286
srgb Avatar asked Oct 02 '13 16:10

srgb


People also ask

Can you have 2 SPF records?

Don't use multiple SPF records! A domain name MUST NOT have multiple records that would cause an authorization check to select more than one record. The rule of thumb: multiple SPF records will fail the SPF authentication.

How many IP addresses can you have in an SPF record?

The SPF record Checker has found an SPF record; Your SPF record doesn't exceed the maximum number of 10 lookups; The configured IP addresses are real addresses that are used to send email from.

Does SPF record need IP address?

The SPF version tag should be followed with all IP addresses that are authorized to send email on behalf of your domain. Next comes the “include” statement, which is needed for every third-party organization that sends email on your behalf.


2 Answers

I think this is a duplicate of Will adding a second SPF record mess up my DNS? on Server Fault.

In short: yes, you must merge them. The specs do not allow multiple SPF records.

The resultant merged record should be:

TXT "v=spf1 ip4:78.46.138.249 ip6:2a01:4f8:d16:1355::2 ~all" 
like image 82
Sander Steffann Avatar answered Sep 22 '22 04:09

Sander Steffann


Yes it is possible and it works, a SPF with both ip6 & Ip4 would look like:

"v=spf1 ip4:XX.XX.XX.XX ip6:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX ~all" 

You can also in both cases add a CIDR (basis: /32 for ipv4 & /128 for ipv6) after each address to authorize a network range rather than a host.

like image 21
Nicolas Guérinet Avatar answered Sep 20 '22 04:09

Nicolas Guérinet