Protecting a Domain Not Used for Email
Overview
This recipe enhances the security of a domain that isn't used for email communication. It prevents the misuse of your domain in email-related attacks by implementing specific DNS records.
DNS Records and Configuration
-
Null MX Record
- Type: MX
- Purpose: Indicates that the domain does not handle email.
- Details: This record prevents any email sent to your domain from being delivered to any mail server, as specified in RFC 7505.
- Implementation: Add an MX record with a priority of
0
and a value of.
(dot), which signifies no mail server.Example: @ IN MX 0 .
-
SPF Record to Block All Email Senders
- Type: TXT
- Purpose: Specifies that no servers are authorized to send emails on behalf of your domain.
- Details: Following RFC 7208, this record tells receiving email servers to reject all emails purporting to be from your domain.
- Implementation: Add a TXT record with the value
"v=spf1 -all"
.Example: @ IN TXT "v=spf1 -all"
-
DKIM Record Without a Public Key
- Type: TXT
- Purpose: Ensures DKIM (DomainKeys Identified Mail) checks fail.
- Details: A DKIM record without a public key causes DKIM validation to fail. This triggers the DMARC policy (described next) to reject emails.
- Implementation: Add a DKIM TXT record but omit the public key part. Note: This might require specific DNS syntax depending on the provider.
Example: default._domainkey IN TXT "v=DKIM1; p="
-
DMARC Record to Enforce Email Rejection
- Type: TXT
- Purpose: Instructs email services on how to handle emails that fail SPF and DKIM checks.
- Details: DMARC (Domain-based Message Authentication, Reporting, and Conformance) specifies the policy for emails that fail authentication. It's described in various RFCs, including RFC 7489.
- Implementation: Add a DMARC TXT record to instruct email services to reject emails failing SPF and DKIM checks.
Example: _dmarc IN TXT "v=DMARC1; p=reject"
Explanation and Benefits
- Null MX Record: Prevents spammers from using your domain for email, as there's no mail server to accept messages.
- SPF Record: Ensures that no emails can be sent from your domain, blocking potential spoofing attempts.
- DKIM Record: By intentionally failing DKIM checks, it reinforces the no-email policy of your domain.
- DMARC Record: Offers a final layer of defense by specifying a rejection policy for emails that fail previous checks, thus protecting your domain's reputation.
Implementation Tips
- Ensure accurate syntax for each DNS record.
- Test each configuration change with DNS lookup tools.
- Remember that DNS changes may take time to propagate.
This recipe offers a comprehensive approach to securing a domain that is not used for email, effectively minimizing the risk of domain misuse in email-based threats.
Created at: 2023-12-25 23:06:54