{"id":186,"date":"2021-03-18T11:34:39","date_gmt":"2021-03-18T11:34:39","guid":{"rendered":"https:\/\/prodmarc.com\/knowledge\/?p=186"},"modified":"2021-03-18T11:34:39","modified_gmt":"2021-03-18T11:34:39","slug":"spf-record-syntax","status":"publish","type":"post","link":"https:\/\/knowledge.progist.net\/index.php\/2021\/03\/18\/spf-record-syntax\/","title":{"rendered":"SPF record syntax"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"186\" class=\"elementor elementor-186\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-59094074 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"59094074\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-33488ce8\" data-id=\"33488ce8\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3319c732 elementor-widget elementor-widget-text-editor\" data-id=\"3319c732\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>Below is the syntax for SPF record :<\/strong><\/p>\n<p>Example: v=spf1 a mx ip4:192.168.0.1 include:spf.example.com -all<\/p>\n<table style=\"width: 100%; border: 1px solid lightgrey;\">\n<tbody>\n<tr>\n<th style=\"border: 1px solid lightgrey;\">V<\/th>\n<th style=\"border: 1px solid lightgrey;\">version<\/th>\n<th style=\"border: 1px solid lightgrey;\">The SPF record version<\/th>\n<th style=\"border: 1px solid lightgrey;\">Description<\/th>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid lightgrey;\">a<\/td>\n<td style=\"border: 1px solid lightgrey;\">\u00a0<\/td>\n<td style=\"border: 1px solid lightgrey;\">Pass<\/td>\n<td style=\"border: 1px solid lightgrey;\">Match if IP has a DNS &#8216;A&#8217; record in given domain .<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid lightgrey;\">mx<\/td>\n<td style=\"border: 1px solid lightgrey;\">\u00a0<\/td>\n<td style=\"border: 1px solid lightgrey;\">Pass<\/td>\n<td style=\"border: 1px solid lightgrey;\">Match if IP is one of the MX hosts for given domain name<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid lightgrey;\">IP4<\/td>\n<td style=\"border: 1px solid lightgrey;\">198.164.0.1<\/td>\n<td style=\"border: 1px solid lightgrey;\">Pass<\/td>\n<td style=\"border: 1px solid lightgrey;\">Match IP address<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid lightgrey;\">include<\/td>\n<td style=\"border: 1px solid lightgrey;\">example.com<\/td>\n<td style=\"border: 1px solid lightgrey;\">Pass<\/td>\n<td style=\"border: 1px solid lightgrey;\">The specified domain is searched for an &#8216;allow&#8217;<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid lightgrey;\">-all<\/td>\n<td style=\"border: 1px solid lightgrey;\">\u00a0<\/td>\n<td style=\"border: 1px solid lightgrey;\">Fail<\/td>\n<td style=\"border: 1px solid lightgrey;\">Always matches. It goes at the end of your record<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>having a valid and accurate SPF record will lead to improved authentication coverage, deliverability and help promote your desired level of security for your domains.<br \/>Mechanisms:<br \/>all<br \/>ip4<br \/>ip6<br \/>a<br \/>mx<br \/>ptr <br \/>exists <br \/>include<\/p>\n<p>&nbsp;<\/p>\n<p>Mechanisms can be used to describe the set of hosts which are designated outbound mailers for the domain and can be prefixed with one of four qualifiers:<br \/>+ (Pass)<br \/>\u2013 (Fail)<br \/>~ (SoftFail)<br \/>? (Neutral)<br \/>The default qualifier is &#8216;+&#8217;, i.e. &#8216;Pass&#8217;.Mechanisms are evaluated in order. If no mechanism or modifier matches, the default result is \u201cNeutral\u201d.If a domain has no SPF record at all, the result is &#8216;None&#8217;. If a domain has a temporary error during DNS processing, you get the result &#8216;TempError&#8217;. If syntax or evaluation error occurs (eg. the domain specifies an unrecognized mechanism) the result is &#8216;PermError&#8217;.<\/p>\n<p><br \/>Evaluation of an SPF record can return any of these results:<br \/><br \/><\/p>\n<table style=\"width: 100%; border: 1px solid lightgrey;\">\n<tbody>\n<tr>\n<th style=\"border: 1px solid lightgrey;\">Result<\/th>\n<th style=\"border: 1px solid lightgrey;\">Explanation<\/th>\n<th style=\"border: 1px solid lightgrey;\">Intended action<\/th>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid lightgrey;\">Pass<\/td>\n<td style=\"border: 1px solid lightgrey;\">The SPF record designates the host to be allowed to send<\/td>\n<td style=\"border: 1px solid lightgrey;\">accept<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid lightgrey;\">Fail<\/td>\n<td style=\"border: 1px solid lightgrey;\">The SPF record has designated the host as NOT being allowed to send<\/td>\n<td style=\"border: 1px solid lightgrey;\">reject<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid lightgrey;\">SoftFail<\/td>\n<td style=\"border: 1px solid lightgrey;\">The SPF record has designated the host as NOT being allowed to send but is in transition<\/td>\n<td style=\"border: 1px solid lightgrey;\">accept but mark<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid lightgrey;\">Neutral<\/td>\n<td style=\"border: 1px solid lightgrey;\">The SPF record specifies explicitly that nothing can be said about validity<\/td>\n<td style=\"border: 1px solid lightgrey;\">accept<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid lightgrey;\">None<\/td>\n<td style=\"border: 1px solid lightgrey;\">The domain does not have an SPF record, or the SPF record does not evaluate to a result<\/td>\n<td style=\"border: 1px solid lightgrey;\">accept<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid lightgrey;\">PermError<\/td>\n<td style=\"border: 1px solid lightgrey;\">A permanent error has occurred (eg. badly formatted SPF record)<\/td>\n<td style=\"border: 1px solid lightgrey;\">unspecified<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid lightgrey;\">TempError<\/td>\n<td style=\"border: 1px solid lightgrey;\">A transient error has occurred<\/td>\n<td style=\"border: 1px solid lightgrey;\">accept or reject<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Below is the syntax for SPF record : Example: v=spf1 a mx ip4:192.168.0.1 include:spf.example.com -all V version The SPF record version Description a \u00a0 Pass Match if IP has a<\/p>\n<p><a href=\"https:\/\/knowledge.progist.net\/index.php\/2021\/03\/18\/spf-record-syntax\/\" class=\"more-link\">Continue Reading<span class=\"screen-reader-text\">SPF record syntax<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","om_disable_all_campaigns":false,"footnotes":""},"categories":[16],"tags":[118,124,125,126,127,130,132],"class_list":["post-186","post","type-post","status-publish","format-standard","hentry","category-spf","tag-spf","tag-spf-mechanisms","tag-spf-qualifier","tag-spf-record","tag-spf-record-example","tag-spf-record-syntax","tag-spf-syntax"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/knowledge.progist.net\/index.php\/wp-json\/wp\/v2\/posts\/186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/knowledge.progist.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/knowledge.progist.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/knowledge.progist.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/knowledge.progist.net\/index.php\/wp-json\/wp\/v2\/comments?post=186"}],"version-history":[{"count":0,"href":"https:\/\/knowledge.progist.net\/index.php\/wp-json\/wp\/v2\/posts\/186\/revisions"}],"wp:attachment":[{"href":"https:\/\/knowledge.progist.net\/index.php\/wp-json\/wp\/v2\/media?parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/knowledge.progist.net\/index.php\/wp-json\/wp\/v2\/categories?post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/knowledge.progist.net\/index.php\/wp-json\/wp\/v2\/tags?post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}