Email marketing is full of obscure acronyms that can be confusing to understand—and DMARC is no exception. 

Domain-based Message Authentication, Reporting & Conformance or DMARC is an email security measure that protects your domain against hacker attacks. We’ll explain DMARC here and how it’ll help you control email deliverability and protect your brand reputation. Still with us? Let’s dive in. 

What is DMARC in email?

The answer to this question is complex. In a nutshell, DMARC is a standard email authentication protocol used to help fight cyberattacks.

DMARC uses other standard authentication protocols—like Sender Policy Framework (SPF) and DomainKeys Identified Mail (DKIM)—to help administrators catch emails sent by cyberattackers that impersonate a legitimate organization. This practice is spoofing and is possible because the attacking email’s “from” address appears identical to a legitimate domain.

Simply put, DMARC is vital to the safety of any organization and its customers.

How does DMARC work?

DMARC enables email senders to specify how to handle emails authenticated using SPF or DKIM. These senders can then opt to send those emails to the junk folder or block them altogether. 

In doing so, internet service providers (ISPs) can more effectively identify spammers and prevent malicious emails from landing in consumer inboxes. DMARC also allows ISPs to minimize false positives and provide better authentication reporting—vastly improving transparency in the marketplace.

Your DMARC record appears alongside your Domain Name System (DNS) records’:

  • SPF
  • A record
  • CNAME
  • DKIM

Its also crucial to note that not all receiving servers will perform a DMARC check before accepting a message, but all the major ISPs do—and implementation of DMARC checks continues to grow. Learn more about the ins and outs of DMARC.

What are the benefits of DMARC?

There are 4 main reasons you’d want your DNS server administrator to add your DMARC record and start monitoring your domain:

  1. To protect your sending reputation: DMARC protects your brand by preventing unauthenticated parties from sending mail from your domain. In some cases, simply publishing a DMARC record can result in a positive reputation bump.
  2. To improve email program visibility: DMARC reports increase visibility into your email program by letting you know who sends email from your domain.
  3. To secure future email deliverability: DMARC helps the email community establish a consistent policy for dealing with messages that fail to authenticate. This helps the email ecosystem become more secure and trustworthy—and helps you stay off spam denylists.
  4. To display your logo with BIMI: DMARC lets you send Brand Indicators for Message Identification (BIMI) specification messages containing your brand’s logo. In doing so, your emails can enhance your brand recognition and be more visually appealing to customers with supported email clients.

What does a DMARC record look like?

You can inspect what a DMARC record looks like by typing “< dig txt _dmarc.sendgrid.net >” into your terminal. Then, check Valimail to view the DMARC record for any domain that has one published.

Here’s an example of Twilio SendGrid’s DMARC record:

v=DMARC1;p=none;rua=mailto:dmarc@sendgrid.com;ruf=mailto:dmarc@sendgrid.com;rf=afrf;pct=100

Breaking down how DMARC works

Here’s an in-depth code breakdown of how DMARC works:

“v=DMARC1” 

This sample indicates the version identifier that the receiving server looks for when scanning the DNS record for the domain that sent the message. If the domain doesn’t contain a text record beginning with “v=DMARC1,” the receiving server won’t run a DMARC check.

“p=none” 

This is the policy the user selects in your DMARC record that tells the participating recipient email server what to do with mail that doesn’t meet SPF and DKIM standards yet claims to be from your domain. In this case, the policy will be “none.” There are 3 policy types:

  1. p=none: This type instructs the receiver not to perform any actions against unqualified mail but to continue sending email reports to the “mailto:” in the DMARC record for any infractions.
  2. p=quarantine: This command tells the receiver to isolate unqualified mail, typically to the spam folder.
  3. p=reject: This policy has the receiver deny all unqualified mail intended for the domain when enabled. Instead, only mail verified as signed by your domain can attempt to reach the inbox. All other mail gets denied to mitigate any false positives.

“rua=mailto:dmarc@sendgrid.com”

This script segment containing a “mailto:” email address of your choosing shows the receiving server where to send aggregate reports of DMARC failures. These reports contain high-level, nongranular information on DMARC failures and get sent daily to the domain administrator holding the DMARC record. 

“ruf=mailto:dmarc@sendgrid.com” 

This sample tells the receiving server where to send forensic reports on DMARC failures. These forensic reports contain details concerning each failure and get sent in real time to the domain administrator that owns the DMARC record. Unlike with the “rua” sample, the “mailto:” email address must be from the domain the DMARC record that published it.

“rf=afrf”

This is the formatting that tells the receiving server the policyholder’s desired reporting approach. Here, “afrf” means “aggregate failure reporting format.”

“pct=100” 

This segment tells the receiving server how much incoming mail must conform to the DMARC policy’s specifications as a percentage value from 1–100. In this case, if the “p=” is 100%, all mail that fails the DMARC check gets rejected. Conversely, when set to 1%, only 1% of failing mail gets rejected—and so on.

But that’s just the beginning. There are many other notable mechanisms to include in a DMARC record. Here are a few:

“sp=” 

This command decides whether the receiving server should apply the DMARC policy to subdomains.

“adkim=” 

This sets the DKIM portion of DMARC authentication to either “s” for strict or “r” for relaxed. The strict setting ensures DKIM will only pass if the “d=” field in the signature precisely matches the “from” domain. When set to relaxed, messages will pass DKIM only if the “d=” field matches the root domain of the “from” address.

“ri=” 

Remember to set the interval for how often you want to receive aggregate reports about DMARC failures.

How do I implement DMARC with Twilio SendGrid?

If you’ve ever had phishing problems in the past or own a financial business that processes sensitive information (or any business for that matter), enabling DMARC authentication can be a valuable tool. In fact, there’s no disadvantage to implementing a DMARC policy now as a way to preempt future email authentication issues due to cyberattackers.

You should also keep in mind that DMARC aggregate and forensic reports are machine-readable, so it can be difficult for humans to make sense of them. As such, you’ll need to use a DMARC report-monitoring service like Valimail—a SendGrid partner—that can collect the reports and access the information.

Once you’ve decided whether to implement DMARC and have selected the services you want enabled, there are 5 steps to follow to set up DMARC:

1. Deploy DKIM & SPF with sender authentication to your SendGrid IP

Start by completing the sender authentication process for your account. Doing so ensures that emails sent through your SendGrid account will be properly signed using DKIM and SPF for your unique domain. 

If you need help completing this step, read our documentation for help.

2. Verify proper DKIM and SPF signing for your allowed domain

Send yourself a handful of test emails to confirm everything works correctly. Then, verify that the DKIM and SPF signatures in your email headers match the domain you’re using to allowlist your SendGrid account.

3. Publish a DMARC record with your DNS registrar and monitor the results

Create a TXT resource record that email receivers can use to determine your DMARC preferences within your DNS registrar. You can accomplish this task within the domain host’s DNS registrar, which is likely in the same location where you created the records for the sender authentication—at the domain’s root level, not the subdomain.

4. Analyze received feedback and adjust your mail streams as needed

Keep in mind that an unqualified email sent to and received from a DMARC-participating recipient result in their email client doing the following:

  • Generating reports for the messages
  • Returning them to the “mailto:” address specified in your DMARC record 

These reports will contain information that can help you evaluate which services send mail on behalf of your domain.

Here’s a sample report containing only one record that shows the results for 2 emails. 

<report_metadata>

<org_name>receiver.com

noreply-dmarc-support@receiver.com

<extra_contact_info>http://receiver.com/dmarc/support

<report_id>9391651994964116463

<date_range>

1335571200

1335657599

<policy_published> sender.com

r

r

none

none

100

<source_ip>72.150.241.94

2 <policy_evaluated> none

fail

pass

<header_from>sender.com

<auth_results>

sender.com

fail

<human_result>

sender.net

pass

<human_result>

sender.com

pass

(Note: The listed SPF and DKIM auth_results are raw results, regardless of the “s=” alignment. The file name appears as “filename = receiver “!” policy-domain “!” begin-timestamp “!” end-timestamp “.” extension” (e.g., receiver.org!sender.com!1335571200!1335657599.zip). 

Also, keep in mind that aggregate reports get sent as a .zip attachment, so be sure the address you define can accept attachments in this file type.

5. Escalate your DMARC policy tags as you learn more

Now that you’ve tested and tweaked your mail streams to determine who sends email on behalf of your domain, it’s time to turn it up a notch.

Until now, you should have only used the “p=none” policy to get reports of any bad behavior to learn the email origination. Now, it’s time to adjust your DMARC record’s policy to begin controlling how receivers handle mail claiming to be from your domain.

Implement DMARC with Twilio SendGrid to level up your security

DMARC records are crucial to the evolution of sophisticated email authentication. Plus, these serve as excellent case studies for the importance of email senders and ISPs working together to maximize the security of their email channel. 

Visit the DMARC organization’s website to learn more about this valuable authentication protocol. Then, discover how to authenticate your email with Twilio SendGrid in just 5 simple steps.



Author
Expert advice and insight about all things email including best practices tips, examples, and advice for marketers, developers, and everyone in between.
Ayanna Julien
Reviewer
As Twilio SendGrid's Editorial Marketing Manager, Ayanna owns the quality assurance of blog content by focusing on authentic storytelling and editorial integrity. When not editing, Ayanna enjoys reading a good fiction novel or writing her own fiction.