Nov 8, 2017

Email SPF examples

$dig txt

"v=spf1 a mx ip4: ip4: -all"

The "a" and "mx" specify the systems permitted to send messages for the given domain.

To add ip of to the SPF so that can send email for


get ip of

Then change the SPF into

"v=spf1 a mx ip4: ip4: ip4: -all"

v=spf1SPF version 1

mxthe incoming mail servers (MXes) of the domain are authorized to also send mail for
The "ip4" mechanism

The argument to the "ip4:" mechanism is an IPv4 network range. If no prefix-length is given, /32 is assumed (singling out an individual host address).

"v=spf1 ip4: -all"

Allow any IP address between and

-allall other machines are not authorized

You can use dig -x ip_address to reverse lookup the ip address.

Testing tools of SPF
If you are using Amazon Simple Email Service:

If you are already publishing SPF or Sender ID records to your Domain Name Service (DNS), recipients might not receive your email. To ensure delivery, add the following to any such records:

If you use gmail API to send your email, ~all

Publishing an SPF record that uses -all instead of ~all may result in delivery problems.

Sender ID Introduction and Resources

Test emails sent to the Port25 email verifier

Port25 offers a really nifty public service -- you can send email to [email protected] and it will reply to the from: address with an extensive diagnostic. Here's an example summary result

from a test email:

SPF check: pass

DomainKeys check: fail

DKIM check: pass

Sender-ID check: pass

SpamAssassin check: ham

Featured Post

Setup Chinese Input Method in Ubuntu 17.10 Artful

sudo apt install ibus-sunpinyin After either of those commands do not forget to restart the IBus daemon ibus restart You might need t...