SPF configuration

Sender Policy Framework (SPF) is defined in RFC7208, Sender Policy Framework (SPF) for Authorizing Use of Domains in Email.

DNS SPF text record example:

IN    TXT    "v=spf1 mx a ip4: ip6:2001:ef3:2911::/64"
                 " a:mail.example.org a:mail2.example.org -all"
  1. v=spf1 Version attribute. only v1 available.

  2. mx a DNS record type. This indicated that mx and a records within the domain are authorized senders.

  3. ip4: indicates that an ipv4 address as specified is authorized as a sender.

  4. ip6:2001:ef3:2911::/64 Sepcifies that an ipv6 subnet is authorized as a sender

  5. -all specifies a fail if the sender doesn't match what is specified in the record. other valid qualifiers are "+" pass, "-" fail, "~" softfail, "?" neutral


To allow only specified MX DNS records to be the only specified senders, create a record as follows:

IN    TXT    "v=spf1 mx -all"

If your MX servers only receive mail, then this option is not suitable. you'll have to use the hostname of the receiving server.

IN    TXT    "v=spf1 a:mail.example.org -all"


This page forms part of our Project Docker-Mail.

Page Metadata
Version: ToDo: place files short git commit here
Date Created: 2022-02-17
Date Edited: 2023-05-23


Would You like to contribute to our Docker-Mail project? You can assist in the following ways:


ToDo: Add the page list of contributors