{"id":655,"date":"2013-02-26T17:27:51","date_gmt":"2013-02-26T17:27:51","guid":{"rendered":"http:\/\/ec2-34-242-84-40.eu-west-1.compute.amazonaws.com\/?p=655"},"modified":"2013-02-26T17:27:51","modified_gmt":"2013-02-26T17:27:51","slug":"how-to-write-an-spf-record","status":"publish","type":"post","link":"https:\/\/tomgeraghty.co.uk\/index.php\/how-to-write-an-spf-record\/","title":{"rendered":"How to write an SPF record"},"content":{"rendered":"<p>An SPF record is a DNS TXT record (like A records and MX records) that indicates to receiving mail servers whether an email has come from a server that is \u201callowed\u201d to send email from that domain. I.e. it\u2019s a check that should prevent spammers impersonating your domain. It does rely on the receiving server actually doing the check, which not all do, so it\u2019s not by any means fool proof, but it should help prevent mass email from your organisation to customers being flagged as potential spam.<\/p>\n<p>&nbsp;<\/p>\n<p>Below is an example SPF record for capitalfmarena.com:<\/p>\n<p>(this is in the public domain &#8211; you can look up an organisation&#8217;s SPF record by using <a href=\"http:\/\/www.unifiedemail.net\/Tools\/SPFParser\/\" target=\"_blank\">online SPF checkers<\/a>)<\/p>\n<p>&nbsp;<\/p>\n<pre>\u201cv=spf1 ip4:93.174.143.18 mx a:service69.mimecast.com mx a:service70.mimecast.com a:capitalfmarena.com -all\u201d<\/pre>\n<p>&nbsp;<\/p>\n<p>V=spf1 specifies the type of record this is. (SPF)<\/p>\n<p>&nbsp;<\/p>\n<p>Ip4: pass if the IP senders IP address matches the addresses we send mail from.<\/p>\n<p>&nbsp;<\/p>\n<p>mx a: pass if sender&#8217;s IP matches an &#8216;MX&#8217; record in the domain<\/p>\n<p>&nbsp;<\/p>\n<p>a: pass if Sender&#8217;s IP matches an &#8216;A&#8217; record in the domain<\/p>\n<p>&nbsp;<\/p>\n<p>The \u2013all indicates that all other senders fail the spf test. (+all would mean anyone can send mail.)<\/p>\n<p>(~all was used when spf was still being implemented, and is a soft fail, but shouldn\u2019t really be used any longer other than when you\u2019re transitioning between mail hosts or something)<\/p>\n<p>&nbsp;<\/p>\n<p>Mechanisms are tested in order and any match will pass the email. A non-match results in a neutral state, until it gets to the end of the string where the \u2013all mechanism will fail it.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An SPF record is a DNS TXT record (like A records and MX records) that indicates to receiving mail servers whether an email has come from a server that is \u201callowed\u201d to send email from that domain. I.e. it\u2019s a check that should prevent spammers impersonating your domain. It does rely on the receiving server &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/tomgeraghty.co.uk\/index.php\/how-to-write-an-spf-record\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to write an SPF record&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,4],"tags":[24,26,41,74,77],"class_list":["post-655","post","type-post","status-publish","format-standard","hentry","category-blog","category-tech","tag-dns","tag-email","tag-it","tag-spf","tag-technology"],"_links":{"self":[{"href":"https:\/\/tomgeraghty.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tomgeraghty.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tomgeraghty.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tomgeraghty.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tomgeraghty.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=655"}],"version-history":[{"count":0,"href":"https:\/\/tomgeraghty.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/655\/revisions"}],"wp:attachment":[{"href":"https:\/\/tomgeraghty.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tomgeraghty.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tomgeraghty.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}