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

  1. 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 .
  2. 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"
  3. 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="
  4. 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

Implementation Tips

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