bind:domain-based_message_authentication_reporting_and_conformance_dmarc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
bind:domain-based_message_authentication_reporting_and_conformance_dmarc [2016/11/18 11:07] – peter | bind:domain-based_message_authentication_reporting_and_conformance_dmarc [2019/11/26 21:01] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Bind - Domain-based Message Authentication Reporting and Conformance (DMARC) ====== | ||
- | DMARC is built upon two other authentication protocols: | ||
- | |||
- | - [[Bind: | ||
- | - [[Bind: | ||
- | |||
- | A DMARC policy allows a sender to indicate that their messages are protected by SPF and/or DKIM, and tells a receiver what to do if neither of those authentication methods passes – such as junk or reject the message. | ||
- | |||
- | |||
- | ===== DNS config ===== | ||
- | |||
- | DMARC-policies are published as TXT records, in DNS. | ||
- | |||
- | The basic record looks like this: | ||
- | |||
- | < | ||
- | _dmarc.example.com. IN TXT " | ||
- | </ | ||
- | |||
- | |||
- | ===== DMARC tags ===== | ||
- | |||
- | DMARC tags tell the email receiver to | ||
- | |||
- | - Check for DMARC and | ||
- | - What to do with messages that fail DMARC authentication. | ||
- | |||
- | |||
- | ^Tag Name^Required^Purpose^Sample^ | ||
- | |v|required|Protocol version|v=DMARC1| | ||
- | |p|required|Policy for domain|p=quarantine| | ||
- | |pct|optional|% of messages subjected to filtering|pct=20| | ||
- | |rua|optional|Reporting URI of aggregate reports|rua=mailto: | ||
- | |ruf|optional|Reporting URI of failure reports|ruf=mailto: | ||
- | |sp|optional|Policy for subdomains of the domain|sp=reject| | ||
- | |aspf|optional|Alignment mode for SPF|aspf=r| | ||
- | |adkim|optional|Alignment mode for DKIM|adkim=r| | ||
- | |fo|optional|Failure reports options|fo=0| | ||
- | |rf|optional|Failure report format|rf=ATRF| | ||
- | |||
- | |||
- | ==== v: Version ==== | ||
- | |||
- | This tag is used to identify the TXT record as a DMARC record, so email receivers can distinguish it from other TXT records. | ||
- | |||
- | Example: | ||
- | |||
- | < | ||
- | v=DMARC1 | ||
- | </ | ||
- | |||
- | |||
- | ==== p: Requested Mail Receiver Policy ==== | ||
- | |||
- | This tag indicates the policy to be enacted by the receiver for messages that fail DMARC authentication and alignment checks, as specified by the domain owner. | ||
- | |||
- | There are three possible values for the p: tag. | ||
- | |||
- | * **p=none**: The domain owner requests no specific action be taken on mail that fails DMARC authentication and alignment. | ||
- | * **p=quarantine**: | ||
- | * **p=reject**: | ||
- | |||
- | Given the information above, the most basic DMARC record example could be: | ||
- | |||
- | < | ||
- | v=DMARC1; p=none | ||
- | </ | ||
- | |||
- | |||
- | ==== rua: Reporting URI of aggregate reports (Optional) ==== | ||
- | |||
- | Indicates where aggregate DMARC reports should be sent to. Senders designate the destination address in the following format: | ||
- | |||
- | < | ||
- | rua=mailto: | ||
- | </ | ||
- | |||
- | If not present aggregate reports will not be sent from the receiving MTA. | ||
- | |||
- | Where a mailto address lies within the sending zone no additional configuration is required, however if the mailto address lies outside the sending zone an additional empty DMRC RR is required. | ||
- | |||
- | < | ||
- | # example.com zone file fragment | ||
- | $ORIGIN example.com. | ||
- | ... | ||
- | # Authorizes the receiving of DMARC reports for example.net. | ||
- | example.net._report._dmarc | ||
- | </ | ||
- | |||
- | |||
- | ==== ruf: Reporting URI of failure reports (Optional) ==== | ||
- | |||
- | Indicates where forensic DMARC reports should be sent to. Senders designate the destination address in the following format: | ||
- | |||
- | < | ||
- | ruf=mailto: | ||
- | </ | ||
- | |||
- | The addresses is a comma separated list of DMARC URIs used in conjunction with the **fo** key. | ||
- | |||
- | Where a mailto address is lies with the sending zone no additional configuration is required, however if the mailto address lies outside the sending zone an additional empty DMRC RR is required. Thus, if the email sending zone is example.net and the DMARC TXT RR contains the parameter **ruf=mailto: | ||
- | |||
- | < | ||
- | # example.com zone file fragment | ||
- | $ORIGIN example.com. | ||
- | ... | ||
- | # authorises the receiving of DMARC reports for example.net | ||
- | example.net._report._dmarc | ||
- | </ | ||
- | |||
- | ==== adkim: DKIM identifier alignment ==== | ||
- | |||
- | Indicates strict or relaxed DKIM identifier alignment. The default is relaxed. | ||
- | |||
- | * **r** (relaxed - default) or | ||
- | * **s** (strict) mode | ||
- | |||
- | In strict mode the sender domain name must exactly match the corresponding d=name (in the DKIM mail headers). | ||
- | |||
- | |||
- | ==== aspf: Alignment mode for SPF ==== | ||
- | |||
- | Indicates strict or relaxed SPF identifier alignment. The default is relaxed. | ||
- | |||
- | * **r** (relaxed - default) or | ||
- | * **s** (strict) mode | ||
- | |||
- | In strict mode the domain.name in the MAIL FROM command (in SMTP) and the from: header (in the mail item) must match exactly. | ||
- | |||
- | |||
- | ==== rf: Report Format (Optional) ==== | ||
- | |||
- | Format used for the message-specific failure reports expressed as an optional comma-separated list of values. | ||
- | |||
- | * **afrf**: Message format for error reporting (Abuse Report format) is defined by RFC 5965. | ||
- | |||
- | * **iodf**: Message format for error reporting (Incident Object Description Exchange Format) is defined by RFC 5070. | ||
- | |||
- | Note that receivers can define other formats, albeit this should be a rare occurrence as most operations are embracing ARF as the reporting format of choice. | ||
- | |||
- | |||
- | The default is Authentication Failure Reporting Format, or " | ||
- | |||
- | |||
- | ==== ri: Reporting Interval (Optional) ==== | ||
- | |||
- | The number of seconds elapsed between sending aggregate reports to the sender. | ||
- | |||
- | Implicitly anything less than 1 hour (3600) can be rounded up to 1 hour by the receiving MTA. | ||
- | |||
- | |||
- | ==== pct: Percentage of messages to which the DMARC policy is to be applied (Optional) ==== | ||
- | |||
- | Defines the percentage of mail to which the DMARC policy applies. | ||
- | |||
- | The specification does not mandate how to calculate this percentage. | ||
- | |||
- | |||
- | ==== fo: Failure reports options (Optional) ==== | ||
- | |||
- | Dictates what type of authentication and/or alignment vulnerabilities are reported back to the Domain Owner. | ||
- | |||
- | There are four values to the latter **fo:** tag: | ||
- | |||
- | * **0**: Generate a DMARC failure report if all underlying authentication mechanisms fail to produce an aligned " | ||
- | * **1**: Generate a DMARC failure report if any underlying authentication mechanism produced something other than an aligned " | ||
- | * **d**: Generate a DKIM failure report if the message had a signature that failed evaluation, regardless of its alignment. | ||
- | * **s**: Generate an SPF failure report if the message failed SPF evaluation, regardless of its alignment. | ||
- | |||
- | While the default is **" | ||
- | |||
- | Defines the error reporting policy the sending MTA requests from the receiving MTA. Multiple options may be defined using colon (:) separated values, for example, **fo=0:s**. | ||
- | |||
- | |||
- | ==== sp: Subdomain Policy (Optional) ==== | ||
- | |||
- | If sp= is present it indicates the defined policy that applies to subdomains. | ||
- | |||
- | There are three possible values for the sp: tag. | ||
- | |||
- | * **p=none**: The subdomain owner requests no specific action be taken on mail that fails DMARC authentication and alignment. | ||
- | * **p=quarantine**: | ||
- | * **p=reject**: | ||
- | |||
- | For example | ||
- | |||
- | < | ||
- | _dmarc | ||
- | </ | ||
- | |||
- | Failed mail from user@example.com would be rejected but mail from user@a.example.com or user@b.a.example.com or user@anything.example.com would be quarantined. | ||
- | |||
- | |||
- | ===== What about sub-domains? | ||
- | |||
- | The final DMARC tag we will discuss today is the sp: tag, which is used to indicate a requested policy for all subdomains where mail is failing the DMARC authentication and alignment checks. | ||
- | |||
- | For the following scenarios, we will use the top-level domain of " | ||
- | |||
- | - The Domain Owner wants to enforce a reject policy for " | ||
- | |||
- | - Domain Owner wants to enforce a reject policy for " | ||
- | |||
- | |||
- | ===== Create a DMARC record in monitor mode ===== | ||
- | |||
- | < | ||
- | v=DMARC1; p=none; fo=1; rua=mailto: | ||
- | </ | ||
- | |||
- | With DMARC in monitor mode, you can gather the information on your entire email ecosystem, including who is sending email on behalf of your brand, what emails are getting delivered, and what emails are not. | ||
- | |||
- | Request to receive the daily aggregate and forensic reports by specifying your email address in the rua tag and the ruf tag, respectively. | ||
- | |||
- | |||
- | ===== Deploy Slowly ===== | ||
- | |||
- | It is strongly recommended to ramp up DMARC use slowly by employing these policies in this order. | ||
- | |||
- | Similarly, the optional pct tag can be used to stage and sample your DMARC deployment. | ||
- | |||
- | A conservative deployment cycle would resemble: | ||
- | |||
- | < | ||
- | Monitor all. | ||
- | Quarantine 1%. | ||
- | Quarantine 5%. | ||
- | Quarantine 10%. | ||
- | Quarantine 25%. | ||
- | Quarantine 50%. | ||
- | Quarantine all. | ||
- | Reject 1%. | ||
- | Reject 5%. | ||
- | Reject 10%. | ||
- | Reject 25%. | ||
- | Reject 50%. | ||
- | Reject all. | ||
- | </ | ||
- | |||
- | Attempt to remove the percentages as quickly as possible to complete the deployment. | ||
- | |||
- | As always, review your daily reports. | ||
- | |||
- | |||
- | ===== Examples ===== | ||
- | |||
- | < | ||
- | v=DMARC1; p=reject; fo=1; rua=mailto: | ||
- | </ | ||
- | |||
- | |||
- | Choose how you want recipient servers to handle email from your domain that fails SPF/DKIM validation. Options are outlined below in red: | ||
- | |||
- | < | ||
- | None: " | ||
- | Reject: " | ||
- | Quarantine: " | ||
- | </ | ||
- | |||
- | Alternately, | ||
- | |||
- | < | ||
- | None: " | ||
- | Reject: " | ||
- | Quarantine: " | ||
- | </ | ||
- | |||
- | |||
- | ===== References ===== | ||
- | |||
- | https:// |
bind/domain-based_message_authentication_reporting_and_conformance_dmarc.1479467276.txt.gz · Last modified: 2020/07/15 09:30 (external edit)