Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create SPF record for multiple IPs?

Tags:

email

spf

I do not find any guidelines regarding how to configure multiple IPs into an SPF record. So far I used (for example):

v=spf1 ip4:180.72.100.0/24 a mx ?all

But now I should add another range of IPs that are allowed, e.g.

v=spf1 ip4:180.72.100.0/24 ip4:180.20.111.0/24 a mx ?all

Is the second syntax correct? Thanks.

like image 824
basZero Avatar asked May 24 '11 12:05

basZero


People also ask

Can SPF record have multiple IP addresses?

A single SPF record can accommodate more than one IP address. The main objective of having an SPF record is to create a list of permitted IP addresses and hostnames to send emails using that domain name. When it comes to adding IP addresses to SPF records, you can add two different IP address types, IPv4 and IPv6.

Does SPF record need IP address?

Sending email from an IP or domain not included in your SPF record results in a failed authentication verification. There are two IP address versions you may need to include in your SPF record: IPv4 and IPv6. Most organizations and ESPs use IPv4 addresses. IPv6 addresses are not widely used at this time.

How many SPF records can you have per domain?

For SPF authentication to pass, all these conditions must be met: you have exactly 1 SPF record on your domain; the record's syntax is correct; the total number of DNS lookups can't exceed 10.


1 Answers

Yes the second syntax is fine.

Have you tried using the SPF wizard? https://www.spfwizard.net/

It can quickly generate basic and complex SPF records.

like image 98
Demelziraptor Avatar answered Oct 17 '22 19:10

Demelziraptor