DMARC (Domain-based Message Authentication, Reporting, and Conformance) is a email authentication protocolwhich protects domains against:
DMARC works with two other message authentication mechanisms:
1. the recipient server (e.g. Gmail, Outlook) receives the email message. 2. checks that the message:
3. based on the result, the server checks DMARC policywhich is set by the sender's domain. 4. depending on the policy (`none`, `quarantine`, `reject`), the message is:
A DMARC record is TXT record, added to the DNS zone of a domain, e.g.:
_dmarc.ostrowski.net.pl. IN TXT "v=DMARC1; p=quarantine; rua=mailto\:kacper\@ostrowski.net.pl
| Parameter | Description |
|---|---|
| `v=DMARC1` | Protocol version (always `DMARC1`). |
| `p=` | DMARC policy (`none`, `quarantine`, `reject`). |
| `rua=` | E-mail address for aggregate reports |
| `ruf=` | E-mail address for forensic reports (rarely used) |
| `fo=` | When to generate reports (e.g. `fo=1` = any SPF/DKIM failure) |
* Monitoring mode. * Takes no action against unauthorised messages. * Used to collect reports and verify SPF/DKIM configuration. * Recommended as a first step.
* Sends suspicious messages to the folder SPAM/JUNK. * Protection against phishing - but does not block messages completely. * Good compromise between security and risk of false positives. * Usually used as a second step before full rejection (`reject`).
* Strongest policy - completely rejects messages that fail the tests. * Provides maximum protection against spoofing. * Recommended only whenwhen:
v=DMARC1; p=none; rua=mailto\:kacper\@ostrowski.net.pl
v=DMARC1; p=quarantine; rua=mailto\:kacper\@ostrowski.net.pl; fo=1
v=DMARC1; p=reject; rua=mailto\:kacper\@ostrowski.net.pl; fo=1
Reports can be analysed manually or with tools such as:
1. Create and verify SPF and DKIM. 2. Add DMARC record with `p=none` and monitor reports. 3. after a few days/weeks:
4. Change policy to `p=quarantine`.. 5. after the next testing phase, go to `p=reject`. (full protection).
DMARC is a key component of email security. It enables the domain owner to:
Full protection requires correct configuration SPF, DKIM and a well-chosen DMARC policy.