This is an internal documentation. There is a good chance you’re looking for something else. See Disclaimer.
DNS Records for Outgoing Mails¶
Create SPF Record¶
As shown below, include:spf.tocco.ch
needs to be added to the SPF record. The record shown below may need to be
extended depending on whether another relay is used to send mails from the same domain. Also, ?all
is
generally safe but the domain owner may wish to use ~all
or -all
to avoid that anyone else can send mails using
her domain.
@ IN TXT "v=spf1 … include:spf.tocco.ch ?all"
Warning
~all
and -all
may lead to mails being rejected or considered spam if the policy is incorrect. Be careful!
Wikipedia has comprehensive article on SPF if more information is needed.
Verify SPF Records¶
Enter domain name
Verify there is no errors printed
Verify record contains “include:spf.tocco.ch”
Have a look at Verify Correctness should you require a more comprehensive test. Usually only needed if there are known problems.
Create DKIM Record¶
A CNAME
record for the name default._domainkey
needs to be created.
default._domainkey IN CNAME default._domainkey.tocco.ch.
See wikipedia entry on DKIM for more details.
Hint
In case the selector name default
is used, an alternative selector
called tocco
can be used:
Switch domain to the
tocco
selector. See commit e3c08e3ff16b for an example.Add the following DNS record:
tocco._domainkey IN CNAME tocco._domainkey.tocco.ch.
Use alternative selector in config.yml:
example: # <-- customer mail_domains: example.net: # <-- domain dkim_selector_name: tocco dkim_value: '{{ _dkim_value_selector_tocco }}'
Verify DKIM Record¶
Enter domain name and “default” as selector
Verify there is no errors printed
Check value is correct by checking if record contains “MyHW9JhhHiLdYNar9H77Ob1” (which is part of the public key).
Look up “default._domainkey.${DOMAIN}” (e.g. default._domainkey.example.net)
Ensure result contains
Type
Cname
CNAME
default._domainkey.tocco.ch
Hint
Old records may be missing the CNAME record. This is okay but new records must contain it.
Have a look at Verify Correctness should you require a more comprehensive test. Usually only needed if there are known problems.
Create DMARC Record¶
A TXT
entry for the name _dmarc
needs to be created. Reports about mails rejected or classified as spam are sent
the the mail address specified in the record.
The subdomain policy, sp
, may need to be adjusted if the domain owner wishes to send mails from subdomains. The
policy p=none
is generally safe but it can also be set to quarantine
or reject
if a stricter policy is
desired.
_dmarc IN TXT "v=DMARC1;p=none;sp=quarantine;pct=100;rua=mailto:dmarcreports@example.com"
Warning
Be careful with quarantine
and reject
. If SPF or DKIM records fail to validate the mail is going to be moved
to spam or reject respectively.
Wikipedia has some more details on DMARC.
Verify Correctness¶
There are several online services that test the records for you. Mail Tester is one of the simpler ones and it covers all the DNS entries listed above.