Rules: 39
mail/bimi-dmarc
BIMI is published but DMARC does not enforce a policy
mail/bimi-dmarc/weak · warning · score 4.4 · site
Mail clients show the BIMI logo only when DMARC quarantines or rejects all mail, so the published logo goes unseen. Checked only on names with a BIMI record.
Reported as
BIMI is published but DMARC does not quarantine or reject all mail, so no receiver shows the logo
Fix
Set the DMARC record to quarantine or reject, without t=y or pct=, since mail clients show the logo only then.
- Name:
_dmarc.<domain> - Content:
v=DMARC1; p=quarantine; rua=mailto:dmarc@<domain>
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.bimi.dmarc-enforced
Expects
{
"const": true
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.bimi": {
"type": "object"
}
}
mail/bimi-logo
The BIMI logo does not load or breaks the SVG profile
mail/bimi-logo/invalid · warning · score 4.3 · site
Receivers show no logo when the file is missing or is not an SVG Tiny PS image, so the BIMI record does nothing. Checked only on names with a BIMI record that names a logo.
Reported as
the BIMI logo does not load or breaks the SVG Tiny PS profile, so receivers show none (got the value found)
Fix
Serve the logo the l= tag names as an SVG with version="1.2" baseProfile="tiny-ps", a <title>, no script and no external reference.
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.bimi.logo.errors
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.bimi": {
"type": "object"
},
"site.hosts.*.mail.bimi.logo": {
"type": "object"
}
}
mail/bimi-vmc
The BIMI mark certificate does not load or is not a PEM file
mail/bimi-vmc/invalid · warning · score 4.2 · site
Receivers that require a verified mark certificate show no logo without a valid one. Checked only on names with a BIMI record that names a certificate.
Reported as
the BIMI certificate the a= tag names does not load or is not a PEM certificate
Fix
Serve the mark certificate your CA issued, in PEM form, at the URL the a= tag of default._bimi.<domain> names.
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.bimi.vmc.parses
Expects
{
"const": true
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.bimi": {
"type": "object"
},
"site.hosts.*.mail.bimi.vmc": {
"type": "object"
}
}
mail/bimi
The BIMI record breaks the BIMI syntax
mail/bimi/invalid · warning · score 4.5 · site
Mail clients ignore a malformed BIMI record, so the brand logo never shows beside the name’s mail. Checked only on names with a BIMI record.
Reported as
the BIMI record breaks its grammar (got the value found)
Fix
Keep one BIMI record, written as:
- Name:
default._bimi.<domain> - Content:
v=BIMI1; l=https://<domain>/logo.svg; a=https://<domain>/vmc.pem
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.bimi.errors
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.bimi": {
"type": "object"
}
}
mail/dane
A mail server has no DNSSEC-signed TLSA record
mail/dane/missing · hint · score 0.8 · site
Without a signed TLSA record at _25._tcp, senders cannot authenticate the server’s certificate and an attacker can pose as it. Checked only when the DANE check is turned on.
Reported as
an exchange has no DNSSEC-signed TLSA record at _25._tcp, so senders cannot authenticate its certificate (got the value found)
Fix
Sign the DNS zone of each mail server of <host> with DNSSEC, then add a TLSA record for each server:
- Name:
_25._tcp.<mail server> - Usage:
3 - Selector:
1 - Matching type:
1 - Certificate:
<SHA-256 hash of the server’s public key>
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.dane
Expects
{
"items": {
"properties": {
"tlsa": {
"minimum": 1
},
"signed": {
"const": true
}
}
}
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.dane": {
"type": "array"
}
}
mail/dkim-key
A DKIM RSA key is shorter than 1024 bits
mail/dkim-key/invalid · error · score 8.8 · site
RFC 8301 requires at least 1024 bits, so receivers treat signatures from the key as absent and the mail can fail DMARC. Checked only on names that take or send mail.
Reported as
a DKIM RSA key is shorter than the 1024 bits RFC 8301 requires, so receivers treat its signatures as absent (got the value found)
Fix
Generate a 2048-bit DKIM key at your mail provider and publish it at a new selector under _domainkey.<domain>.
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.dkim.found
Expects
{
"items": {
"properties": {
"bits": {
"minimum": 1024
}
}
}
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.dkim": {
"type": "object"
}
}
A DKIM RSA key is shorter than 2048 bits
mail/dkim-key/weak · warning · score 3.8 · site
RFC 8301 recommends 2048 bits, since a shorter key is within reach of an attacker who wants to forge signed mail. Checked only on names that take or send mail.
Reported as
a DKIM RSA key is shorter than 2048 bits, which RFC 8301 recommends (got the value found)
Fix
Generate a 2048-bit DKIM key at your mail provider and publish it at a new selector under _domainkey.<domain>.
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.dkim.found
Expects
{
"items": {
"properties": {
"bits": {
"not": {
"minimum": 1024,
"maximum": 2047
}
}
}
}
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.dkim": {
"type": "object"
}
}
mail/dkim-revoked
A DKIM selector publishes a revoked, empty key
mail/dkim-revoked/present · info · score 1.6 · site
An empty key revokes the selector, which suits a retired one; if the servers still sign with it, every signature fails and mail may fail DMARC. Checked only on names that take or send mail.
Reported as
a DKIM selector publishes an empty key, which revokes it; fine for a retired selector, not for one in use (got the value found)
Fix
Delete the DKIM record with the empty key a week after your servers stopped signing with it.
- Name:
<selector>._domainkey.<domain>
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.dkim.found
Expects
{
"items": {
"properties": {
"revoked": {
"const": false
}
}
}
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.dkim": {
"type": "object"
}
}
mail/dkim-testing
A DKIM key is still marked as testing
mail/dkim-testing/present · warning · score 3.9 · site
With the t=y flag, receivers may ignore a failed signature, so forged mail signed wrongly is not caught. Checked only on names that take or send mail.
Reported as
a DKIM key still carries the t=y testing flag, so receivers may ignore failed signatures (got the value found)
Fix
Remove t=y from the DKIM record.
- Name:
<selector>._domainkey.<domain>
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.dkim.found
Expects
{
"items": {
"properties": {
"testing": {
"const": false
}
}
}
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.dkim": {
"type": "object"
}
}
mail/dkim
A DKIM key record breaks the DKIM syntax
mail/dkim/invalid · warning · score 4.0 · site
Signatures made with a malformed key fail verification, so receivers treat the name’s mail as unsigned and DMARC can fail it. Checked only on names that take or send mail.
Reported as
a DKIM key record breaks the RFC 6376 grammar, so signatures under it fail (got the value found)
Fix
Publish the DKIM record again exactly as your mail provider gives it.
- Name:
<selector>._domainkey.<domain> - Content:
v=DKIM1; k=rsa; p=<the key>
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.dkim.found
Expects
{
"items": {
"properties": {
"errors": {
"maxItems": 0
}
}
}
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.dkim": {
"type": "object"
}
}
No DKIM key found for the name
mail/dkim/missing · hint · score 0.7 · site
Without a DKIM key, receivers cannot verify that mail was signed by the name’s servers, so DMARC and spam filters trust the mail less. The probe tries common selector names only, so a custom selector may be missed.
Reported as
no DKIM key found under any common selector; the probe list cannot be complete, so check your provider’s selector
Fix
Publish the DKIM key your mail provider gives you as a TXT record, where <selector> is the name the provider gives the key:
- Name:
<selector>._domainkey.<domain> - Content:
v=DKIM1; k=rsa; p=<the key>
Then list the selector under org.spiderlint.mail.dkim-selectors.
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.dkim.found
Expects
{
"minItems": 1
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.dkim": {
"type": "object"
}
}
mail/dmarc-external-auth
DMARC sends reports to a domain that does not accept them
mail/dmarc-external-auth/missing · warning · score 5.3 · site
Receivers drop reports addressed to another domain that has not agreed to take them, so the owner gets none. Checked only on names with a valid DMARC record.
Reported as
DMARC sends reports to a domain that does not accept them, so receivers drop them (got the value found)
Fix
Ask whoever receives the reports to publish a TXT record that accepts reports about <domain>, where <destination> is the domain of their address:
- Name:
<domain>._report._dmarc.<destination> - Content:
v=DMARC1
Or send the reports to an address under <domain> instead.
Runs by default, in the recommended ruleset.
References
For rule authors
Reads
site.hosts.*.mail.dmarc.unauthorized
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.dmarc": {
"type": "object"
},
"site.hosts.*.mail.dmarc.errors": {
"maxItems": 0
}
}
mail/dmarc-report-uri
A DMARC report address is not a mailto: address
mail/dmarc-report-uri/invalid · warning · score 4.1 · site
A rua or ruf address that is not a mailto: URI gets no reports, so the owner never learns who sends or forges mail as the name. Checked only on names with a valid DMARC record.
Reported as
a DMARC report address is not a mailto: URI, so no report reaches it (got the value found)
Fix
Write each rua= and ruf= address in the DMARC record as a mailto: address, for example:
- Name:
_dmarc.<domain> - Content:
v=DMARC1; p=reject; rua=mailto:dmarc@<domain>
Runs by default, in the recommended ruleset.
References
For rule authors
Reads
site.hosts.*.mail.dmarc.not-mailto
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.dmarc": {
"type": "object"
},
"site.hosts.*.mail.dmarc.errors": {
"maxItems": 0
}
}
mail/dmarc-subdomain-policy
The DMARC record sets no policy for subdomains
mail/dmarc-subdomain-policy/weak · info · score 2.6 · site
Subdomains silently inherit the main policy, so a change to it affects them unplanned, and mail forged from a subdomain may slip through. Checked only on the domain’s own record, where subdomains exist.
Reported as
the DMARC record sets no sp= policy although the domain serves subdomains, which then inherit p= silently
Fix
Add sp=reject to the DMARC record, or the policy your subdomains need, so mail forged from a subdomain is refused too.
- Name:
_dmarc.<domain> - Content:
v=DMARC1; p=reject; sp=reject; rua=mailto:dmarc@<domain>
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.dmarc
Expects
{
"required": [
"sp"
]
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.dmarc": {
"type": "object"
},
"site.hosts.*.mail.dmarc.errors": {
"maxItems": 0
},
"site.hosts.*.mail.dmarc.subdomains": true
}
mail/dmarc-testing
The DMARC policy is in test mode
mail/dmarc-testing/present · info · score 2.4 · site
With t=y or pct below 100, receivers apply the policy to only part of the mail, so some forged mail still reaches inboxes. Checked only on names with a valid DMARC record.
Reported as
the DMARC policy is in test mode, t=y or pct below 100, so receivers do not apply it to all mail
Fix
Remove t=y and pct= from the DMARC record, so its policy applies to all mail.
- Name:
_dmarc.<domain>
Do this once the reports sent to its rua= address list only servers that are yours.
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.dmarc.testing
Expects
{
"const": false
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.dmarc": {
"type": "object"
},
"site.hosts.*.mail.dmarc.errors": {
"maxItems": 0
}
}
mail/dmarc
The name publishes more than one DMARC record
mail/dmarc/duplicate · warning · score 6.3 · site
Receivers discard all DMARC records when there are several, so the name has no policy and forged mail is not stopped. Checked only on names that take or send mail.
Reported as
the name publishes the value found DMARC records, so receivers discard all of them
Fix
Keep one TXT record starting with v=DMARC1, and merge the others into it.
- Name:
_dmarc.<domain>
Runs by default, in the recommended ruleset.
References
For rule authors
Reads
site.hosts.*.mail.dmarc.records
Expects
{
"maximum": 1
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.dmarc": {
"type": "object"
}
}
The DMARC record breaks the DMARC syntax
mail/dmarc/invalid · warning · score 6.1 · site
Receivers ignore a malformed DMARC record, so the name has no policy and forged mail is not stopped. Checked only on names that take or send mail.
Reported as
the DMARC record breaks the RFC 9989 grammar (got the value found)
Fix
Rewrite the DMARC record as v=DMARC1 followed by tag=value pairs separated by semicolons, for example:
- Name:
_dmarc.<domain> - Content:
v=DMARC1; p=reject; rua=mailto:dmarc@<domain>
Runs by default, in the recommended ruleset.
References
For rule authors
Reads
site.hosts.*.mail.dmarc.errors
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.dmarc": {
"type": "object"
}
}
mail/mta-sts-max-age
The MTA-STS policy is cached for under a day
mail/mta-sts-max-age/weak · warning · score 4.7 · site
A max_age under a day makes senders forget the policy between messages, so the protection against downgrade rarely applies. Checked only on names with a readable MTA-STS policy.
Reported as
the MTA-STS max_age is the value found seconds, under a day, so senders forget the policy between messages
Fix
Set max_age: 604800 or more in https://mta-sts.<domain>/.well-known/mta-sts.txt.
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.mta-sts.policy.max-age
Expects
{
"minimum": 86400
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.mta-sts": {
"type": "object"
},
"site.hosts.*.mail.mta-sts.policy.errors": {
"maxItems": 0
}
}
mail/mta-sts-mode
The MTA-STS policy does not enforce TLS
mail/mta-sts-mode/weak · hint · score 0.6 · site
In testing or none mode, senders still deliver when TLS fails, so mail can still be intercepted. Checked only on names with a readable MTA-STS policy.
Reported as
the MTA-STS policy is in the value found mode, so senders still deliver when TLS fails
Fix
Set mode: enforce in https://mta-sts.<domain>/.well-known/mta-sts.txt, then give the MTA-STS record a new id, so senders read the file again:
- Name:
_mta-sts.<domain> - Content:
v=STSv1; id=20260102
Do this once the TLS reports you receive show no failed deliveries.
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.mta-sts.policy.mode
Expects
{
"const": "enforce"
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.mta-sts": {
"type": "object"
},
"site.hosts.*.mail.mta-sts.policy.errors": {
"maxItems": 0
}
}
mail/mta-sts-mx
The MTA-STS policy does not cover every mail server
mail/mta-sts-mx/mismatch · warning · score 4.8 · site
Senders that enforce the policy refuse to deliver to a mail server it does not list, so mail to that server is lost. Checked only on names with a readable MTA-STS policy.
Reported as
the MTA-STS policy covers no mx: pattern for an exchange, so enforcing senders refuse to deliver to it (got the value found)
Fix
Add an mx: line for every mail server of <host> to https://mta-sts.<domain>/.well-known/mta-sts.txt, then give the MTA-STS record a new id, so senders read the file again:
- Name:
_mta-sts.<domain> - Content:
v=STSv1; id=20260102
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.mta-sts.policy.unmatched
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.mta-sts": {
"type": "object"
},
"site.hosts.*.mail.mta-sts.policy.errors": {
"maxItems": 0
}
}
mail/mta-sts-policy
The MTA-STS policy file cannot be read
mail/mta-sts-policy/unreachable · warning · score 5.4 · site
Senders ignore the policy when the file does not answer 200 as plain text or does not parse, so mail is not protected against downgrade. Checked only on names with an MTA-STS record.
Reported as
the MTA-STS policy file does not answer 200 as text/plain or does not parse, so senders ignore it (got the value found)
Fix
Serve https://mta-sts.<domain>/.well-known/mta-sts.txt with status 200 as text/plain, carrying version: STSv1, mode: enforce, one mx: line per Mail server and max_age: 604800.
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.mta-sts.policy.errors
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.mta-sts": {
"type": "object"
},
"site.hosts.*.mail.mta-sts.policy": {
"type": "object"
}
}
mail/mta-sts
The MTA-STS record breaks the MTA-STS syntax
mail/mta-sts/invalid · warning · score 5.5 · site
Senders ignore a malformed _mta-sts record and its policy, so mail is not protected against downgrade to plain text. Checked only on names that take or send mail.
Reported as
the _mta-sts record breaks the RFC 8461 grammar, so senders ignore the policy (got the value found)
Fix
Keep one MTA-STS record, its id made of letters and digits only.
- Name:
_mta-sts.<domain> - Content:
v=STSv1; id=20260101
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.mta-sts.errors
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.mta-sts": {
"type": "object"
}
}
The name has no MTA-STS policy
mail/mta-sts/missing · info · score 2.0 · site
Without MTA-STS, senders deliver over STARTTLS that an attacker on the path can strip, so mail can be read or altered in transit. Checked only on names that take or send mail.
Reported as
no MTA-STS record, so senders deliver over STARTTLS that an attacker on the path can strip
Fix
Serve a text file at https://mta-sts.<domain>/.well-known/mta-sts.txt with these lines, one mx: line per mail server of the name:
version: STSv1mode: enforcemx: <mail server>max_age: 604800
Then add a TXT record:
- Name:
_mta-sts.<domain> - Content:
v=STSv1; id=20260101
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.mta-sts
Expects
{
"required": [
"record"
]
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.mta-sts": {
"type": "object"
}
}
mail/mx-address
A mail server named in an MX record has no address
mail/mx-address/missing · warning · score 5.9 · site
A server with no A or AAAA record cannot be reached, so mail to it bounces or waits in senders’ queues. Checked only on names that take or send mail.
Reported as
an MX exchange has no A or AAAA record, so mail to it bounces (got the value found)
Fix
Add A and AAAA records for the Mail server the MX record of <host> names, or point the MX at a server that has them.
Runs by default, in the recommended ruleset.
References
For rule authors
Reads
site.hosts.*.mail.exchanges
Expects
{
"items": {
"properties": {
"addresses": {
"minimum": 1
}
}
}
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.exchanges": {
"type": "array"
}
}
mail/mx-cname
A mail server named in an MX record is a CNAME
mail/mx-cname/present · warning · score 5.6 · site
RFC 2181 forbids an MX target that is an alias, and some senders refuse to deliver to it, so mail is lost or delayed. Checked only on names that take or send mail.
Reported as
an MX exchange is a CNAME, which RFC 2181 forbids and some senders refuse (got the value found)
Fix
Set the Mail server of the MX record of <host> to the CNAME’s target, the name that has the A and AAAA records.
Runs by default, in the recommended ruleset.
References
For rule authors
Reads
site.hosts.*.mail.exchanges
Expects
{
"items": {
"properties": {
"cname": {
"const": false
}
}
}
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.exchanges": {
"type": "array"
}
}
mail/mx-literal
A mail server named in an MX record is an IP address
mail/mx-literal/present · warning · score 5.7 · site
An MX must name a host, so senders cannot use an IP address and mail to it bounces. Checked only on names that take or send mail.
Reported as
an MX exchange is an IP address, not a name, so senders cannot use it (got the value found)
Fix
Give the mail server a name with an A record, such as mx.<domain>, and set it as the Mail server of the MX record of <host>.
Runs by default, in the recommended ruleset.
References
For rule authors
Reads
site.hosts.*.mail.exchanges
Expects
{
"items": {
"properties": {
"literal": {
"const": false
}
}
}
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.exchanges": {
"type": "array"
}
}
mail/mx
The MX set lists the same mail server more than once
mail/mx/duplicate · warning · score 3.3 · site
Repeated entries add nothing and hint at a copy mistake, and a sender that retries each entry wastes time on the same dead server. Checked only on names that take or send mail.
Reported as
the MX set names an exchange more than once (got the value found)
Fix
Delete the repeated MX records of <host>, keeping one per Mail server.
Runs by default, in the recommended ruleset.
References
For rule authors
Reads
site.hosts.*.mail.duplicates
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.duplicates": {
"type": "array"
}
}
mail/smtp-banner
A mail server’s greeting name differs from its reverse DNS name
mail/smtp-banner/mismatch · info · score 1.2 · site
When the 220 banner names a host the address’s PTR record does not, some receivers score the server’s mail as spam. Checked only when the STARTTLS check is turned on.
Reported as
an exchange’s 220 banner names a host its address’s PTR does not, which some receivers score as spam (got the value found)
Fix
Make the SMTP greeting name of each MX of <host> and the PTR record of its address the same name.
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.starttls
Expects
{
"items": {
"properties": {
"banner-matches": {
"const": true
}
}
}
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.starttls": {
"type": "array"
}
}
mail/spf-after-all
The SPF record lists mechanisms after all
mail/spf-after-all/unused · warning · score 5.1 · site
Receivers stop at all and never read what follows, so servers listed there are not authorised and their mail fails the check. Checked only on names with a valid SPF record.
Reported as
SPF lists mechanisms after all, which receivers never reach (got the value found)
Fix
Move every term of the SPF record before its all, which receivers read last, for example:
- Name:
<host> - Content:
v=spf1 mx include:_spf.example.net -all
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.spf-walk.after-all
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.spf-walk": {
"type": "object"
},
"site.hosts.*.mail.spf-walk.errors": {
"maxItems": 0
}
}
mail/spf-include
The SPF record includes a name that has no SPF record
mail/spf-include/broken · warning · score 5.0 · site
Receivers treat an include or redirect to a name without a single SPF record as a permanent error, so the whole check fails and genuine mail can be rejected. Checked only on names with a valid SPF record.
Reported as
SPF includes or redirects to a name with no single SPF record, a permanent error to receivers (got the value found)
Fix
Delete the include: or redirect= of the SPF record that points at a domain with no SPF record, or correct its spelling.
- Name:
<host>
Runs by default, in the recommended ruleset.
References
For rule authors
Reads
site.hosts.*.mail.spf-walk.missing-includes
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.spf-walk": {
"type": "object"
},
"site.hosts.*.mail.spf-walk.errors": {
"maxItems": 0
}
}
mail/spf-lookups
The SPF record needs more than 10 DNS lookups
mail/spf-lookups/excessive · warning · score 5.8 · site
RFC 7208 caps SPF at 10 lookups counting every include, so receivers fail the check and genuine mail can be rejected or sent to spam. Checked only on names that take or send mail with a valid SPF record.
Reported as
SPF needs the value found DNS lookups counting its includes, over the 10 RFC 7208 allows, so receivers fail it
Fix
Cut the SPF record down to at most 10 DNS lookups: each include, a, mx, ptr and exists term costs one, and so does every such term inside an included record.
- Name:
<host>
Replace an include: with the ip4: and ip6: ranges its record lists, and update them when the provider changes its servers.
Runs by default, in the recommended ruleset.
References
For rule authors
Reads
site.hosts.*.mail.spf-walk.lookups
Expects
{
"maximum": 10
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.spf-walk": {
"type": "object"
},
"site.hosts.*.mail.spf-walk.errors": {
"maxItems": 0
}
}
mail/spf-ptr
The SPF record uses the discouraged ptr mechanism
mail/spf-ptr/deprecated · warning · score 4.9 · site
RFC 7208 says not to use ptr because it is slow and unreliable, so receivers may time out or fail the check and genuine mail can go missing. Checked only on names with a valid SPF record.
Reported as
SPF uses the ptr mechanism, which RFC 7208 says not to use, since it is slow and unreliable
Fix
Replace ptr in the SPF record with the ip4: and ip6: addresses of the servers it matched.
- Name:
<host>
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.spf-walk.ptr
Expects
{
"const": false
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.spf-walk": {
"type": "object"
},
"site.hosts.*.mail.spf-walk.errors": {
"maxItems": 0
}
}
mail/spf-void-lookups
The SPF record makes too many lookups that find nothing
mail/spf-void-lookups/excessive · warning · score 5.2 · site
RFC 7208 allows two lookups that return no record, so receivers fail the check when a stale include points at a name that no longer exists, and genuine mail can be rejected. Checked only on names with a valid SPF record.
Reported as
SPF makes the value found lookups that find nothing, over the 2 RFC 7208 allows, so receivers fail it
Fix
Delete the terms of the SPF record that name a domain with no record, such as an include: of a mail provider you no longer use.
- Name:
<host>
Runs by default, in the recommended ruleset.
References
For rule authors
Reads
site.hosts.*.mail.spf-walk.void-lookups
Expects
{
"maximum": 2
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.spf-walk": {
"type": "object"
},
"site.hosts.*.mail.spf-walk.errors": {
"maxItems": 0
}
}
mail/spf
The SPF record breaks the SPF syntax
mail/spf/invalid · warning · score 6.2 · site
Receivers treat a malformed SPF record as a permanent error and ignore it, so the name’s mail is no longer protected against forgery and genuine mail may be marked suspect. Checked only on names that take or send mail.
Reported as
the SPF record breaks the RFC 7208 grammar, so receivers treat it as a permanent error and ignore it (got the value found)
Fix
Rewrite the SPF record as v=spf1, then the servers allowed to send, then -all, separated by single spaces, for example:
- Name:
<host> - Content:
v=spf1 mx ip4:192.0.2.1 include:_spf.example.net -all
Runs by default, in the recommended ruleset.
References
For rule authors
Reads
site.hosts.*.mail.spf-walk.errors
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.spf-walk": {
"type": "object"
}
}
The SPF record repeats a term or has a pointless redirect
mail/spf/redundant · info · score 1.4 · site
Repeated mechanisms waste the 10-lookup budget, and a redirect that all makes unreachable misleads whoever maintains the record, so it breaks more easily. Checked only on names with a valid SPF record.
Reported as
SPF repeats a mechanism, or carries a redirect that all makes unreachable (got the value found)
Fix
Delete the repeated terms from the SPF record, and drop redirect= when the record ends in all.
- Name:
<host>
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.spf-walk.redundant
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.spf-walk": {
"type": "object"
},
"site.hosts.*.mail.spf-walk.errors": {
"maxItems": 0
}
}
mail/starttls-certificate
A mail server’s STARTTLS certificate is not valid for its name
mail/starttls-certificate/invalid · warning · score 6.0 · site
Senders that use MTA-STS or DANE refuse a certificate that does not validate, so mail to that server is delayed or bounces. Checked only when the STARTTLS check is turned on.
Reported as
an exchange’s STARTTLS certificate does not validate for its name, so MTA-STS and DANE senders refuse it (got the value found)
Fix
Install a certificate from a public CA covering the Mail server name, with its full chain, on every MX of <host>.
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.starttls
Expects
{
"items": {
"anyOf": [
{
"properties": {
"offered": {
"const": false
}
}
},
{
"properties": {
"authorized": {
"const": true
}
}
}
]
}
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.starttls": {
"type": "array"
}
}
mail/starttls
A mail server does not offer STARTTLS on port 25
mail/starttls/missing · warning · score 6.4 · site
Mail to a server without STARTTLS travels in clear text, so anyone on the path can read it. Checked only when the STARTTLS check is turned on.
Reported as
an exchange does not offer STARTTLS on port 25, so mail to it travels in the clear (got the value found)
Fix
Turn on STARTTLS with a certificate for the Mail server name on every MX of <host>.
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.starttls
Expects
{
"items": {
"properties": {
"offered": {
"const": true
}
}
}
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.starttls": {
"type": "array"
}
}
mail/tls-rpt
The TLS-RPT record breaks the TLS-RPT syntax
mail/tls-rpt/invalid · warning · score 4.6 · site
Senders ignore a malformed record, so no reports of failed TLS deliveries arrive. Checked only on names that take or send mail.
Reported as
the TLS-RPT record breaks the RFC 8460 grammar (got the value found)
Fix
Keep one TLS reporting record, written as:
- Name:
_smtp._tls.<domain> - Content:
v=TLSRPTv1; rua=mailto:tls-reports@<domain>
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.tls-rpt.errors
Expects
{
"maxItems": 0
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.tls-rpt": {
"type": "object"
}
}
The name has no TLS-RPT record
mail/tls-rpt/missing · info · score 1.8 · site
Without it, mail servers cannot report failed TLS deliveries, so problems with the name’s mail encryption stay unseen. Checked only on names that take or send mail.
Reported as
no TLS-RPT record, so senders cannot report failed TLS deliveries
Fix 1
Add a TXT record, so mail servers tell you when they could not deliver to you over TLS.
- Name:
_smtp._tls.<domain> - Content:
v=TLSRPTv1; rua=mailto:tls-reports@<domain>
Fix 2
Report Relay https://dbuho.me/project/report-relay/ collects these reports and sends them to your Grafana: open source, self-hosted, free.
Off by default; a group that runs mail turns it on.
References
For rule authors
Reads
site.hosts.*.mail.tls-rpt
Expects
{
"required": [
"record"
]
}
When
{
"site.hosts.*.mail.mode": "mail",
"site.hosts.*.mail.tls-rpt": {
"type": "object"
}
}