Email Authentication for Transactional vs. Marketing Emails

Technical differences in authentication setup for transactional and marketing emails, including subdomain considerations and policy recommendations.

SpamBarometer Team
April 5, 2025
10 min read

Email authentication is a critical component of deliverability for both transactional and marketing emails. While the high-level concepts are the same, there are important technical differences in how authentication should be configured for each type of email. This comprehensive guide will dive deep into the nuances of email authentication for transactional vs marketing emails, including subdomain setup, SPF and DKIM policies, DMARC alignment, and industry best practices. Whether you're just getting started with email authentication or looking to optimize your existing implementation, this guide will provide actionable insights you can use to ensure your emails reach the inbox.

Understanding Email Authentication Fundamentals

Before we explore the differences between transactional and marketing email authentication, it's important to have a solid grasp of the key authentication protocols and how they work together to establish trust and prevent spoofing and phishing.

SPF (Sender Policy Framework)

SPF allows domain owners to specify which mail servers are authorized to send email on behalf of their domain. This is done by publishing a DNS TXT record that lists the approved sending IP addresses or hostnames.

Here's an example of an SPF record:

"v=spf1 ip4:192.168.1.1 ip4:192.168.1.2 include:_spf.google.com -all"

This record authorizes the IP addresses 192.168.1.1 and 192.168.1.2, as well as any servers listed in the SPF record for _spf.google.com, to send email for the domain. The -all directive indicates a hard fail for any other servers.

Note: It's important to use the -all directive to prevent SPF softfails, which can negatively impact deliverability.

DKIM (DomainKeys Identified Mail)

DKIM provides an encryption-based authentication method that verifies the sender's identity and ensures the email hasn't been altered in transit. With DKIM, the sender publishes a public key in their DNS records and signs outgoing emails with a corresponding private key. Email providers then use the public key to verify the signature and authenticate the message.

The following diagram illustrates the DKIM signing and verification process:
Diagram 1
Diagram 1
The diagram should show: 1. The sending server generates a DKIM signature using the private key 2. The signature is added to the email headers 3. The receiving server retrieves the public key from the sender's DNS records 4. The receiving server verifies the signature using the public key to authenticate the message

To implement DKIM, you'll need to generate a public/private key pair and add the public key to your domain's DNS as a TXT record. The record will look something like this:

default._domainkey IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDQPu3SXrRMTvJ+jFvNsHvKo6Kw4pqk7J5RgQy/Cmlgn8aTYvx/qAWbJNe8xmbK8..."

You'll then configure your email sending platform or SMTP server to sign outgoing messages with the corresponding private key.

DMARC (Domain-based Message Authentication, Reporting, and Conformance)

DMARC builds upon SPF and DKIM to provide a policy framework for specifying how email providers should handle authentication failures. With DMARC, domain owners can instruct providers to quarantine or reject emails that fail SPF or DKIM checks, as well as receive aggregate and forensic reports on authentication results.

A DMARC record is published as a DNS TXT record and includes several key directives:
Directive Description
v DMARC version (should be DMARC1)
p Policy for handling failed verifications (none, quarantine, reject)
rua Reporting URI for aggregate reports
ruf Reporting URI for forensic reports
sp Policy for subdomains (defaults to organizational policy)
Here's an example of a DMARC record using these directives:
"v=DMARC1; p=quarantine; rua=mailto:dmarc-aggregate@example.com; ruf=mailto:dmarc-afrf@example.com; sp=reject; adkim=s; aspf=s;"

This record specifies a quarantine policy for the organizational domain, a reject policy for subdomains, and requests both aggregate and forensic reports to be sent to the specified email addresses. It also requires strict alignment for both DKIM and SPF.

Important: Before publishing a reject policy, it's crucial to ensure all legitimate email sources are properly authenticated to avoid delivery failures.

Differences in Authentication for Transactional vs Marketing Emails

While the core authentication protocols are the same for both transactional and marketing emails, there are important differences in how they should be implemented to ensure optimal deliverability and security.

Subdomain Setup

One of the key differences between transactional and marketing email authentication is the use of subdomains. Transactional emails, such as password resets, order confirmations, and account notifications, are typically sent from a subdomain like transactional.example.com or mail.example.com. This helps separate them from marketing messages and allows for more granular authentication policies.

Marketing emails, on the other hand, are usually sent from the organizational domain (example.com) or a branded subdomain like newsletter.example.com or offers.example.com. This allows for consistent branding and helps build trust with subscribers.

The following diagram illustrates a sample subdomain structure for transactional and marketing emails:
Diagram 2
Diagram 2
The diagram should show: 1. The organizational domain (example.com) 2. Subdomains for transactional email (transactional.example.com, mail.example.com) 3. Subdomains for marketing email (newsletter.example.com, offers.example.com) 4. Arrows indicating the flow of transactional and marketing emails from their respective subdomains

When setting up subdomains for email authentication, it's important to create separate SPF and DKIM records for each subdomain. This allows you to specify different authorized sending servers and signing keys for transactional and marketing emails.

SPF Considerations for Subdomains

When creating SPF records for subdomains, you have two options:

  1. Create a separate SPF record for each subdomain
  2. Use the include directive to reference the organizational domain's SPF record

For example, if your organizational domain's SPF record includes include:_spf.example.com, you can create a subdomain SPF record like this:

"v=spf1 include:_spf.example.com -all"

This ensures that any updates to the organizational domain's SPF record will automatically apply to the subdomain as well.

Best Practice: Use separate SPF records for transactional and marketing subdomains to allow for more granular control over authorized sending servers.

DKIM Considerations for Subdomains

Like SPF, it's recommended to use separate DKIM keys for transactional and marketing subdomains. This allows you to rotate keys independently and reduces the impact of a key compromise.

When generating DKIM keys for subdomains, be sure to use a unique selector for each key. The selector is prepended to the ._domainkey subdomain in the DNS record. For example:

transactional._domainkey.example.com IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GC..."
marketing._domainkey.example.com IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GC..."

DKIM Key Rotation

To maintain security and minimize disruption, it's important to regularly rotate your DKIM keys. When rotating keys, be sure to:

  • Generate a new key pair
  • Publish the new public key to your DNS records
  • Update your email sending platform or SMTP server to use the new private key
  • Allow time for the old and new keys to coexist to avoid verification failures during the transition
  • Remove the old key from DNS once the transition is complete

DMARC Policy Alignment

DMARC requires both SPF and DKIM alignment to pass authentication. Alignment means that the domain used for SPF authentication and the domain in the DKIM signature match the domain in the email's "From" header.

The following diagram illustrates the concept of SPF and DKIM alignment:
Diagram 3
Diagram 3
The diagram should show: 1. An email with the "From" header set to "sender@example.com" 2. The email body or a callout indicating the DKIM signing domain is "example.com" 3. An arrow pointing from the email to the SPF record for "example.com" 4. Checkmarks or other indicators showing both SPF and DKIM alignment with "example.com"

For transactional emails sent from subdomains, it's important to ensure the "From" header matches the subdomain used for SPF and DKIM. This is known as "relaxed alignment".

For example, if your transactional emails are sent from transactional.example.com with SPF and DKIM authenticated on that subdomain, the "From" header should be something like sender@transactional.example.com.

Marketing emails, on the other hand, often use the organizational domain in the "From" header for branding purposes. In this case, "strict alignment" is required, meaning the SPF and DKIM domains must exactly match the "From" domain.

Note: Some email providers, like Google, may allow relaxed alignment for subdomains of authenticated organizational domains. However, for maximum compatibility, it's best to use strict alignment whenever possible.

DMARC Policy Recommendations

When setting up DMARC for transactional and marketing emails, it's important to choose the appropriate policy based on your authentication implementation and risk tolerance.

Transactional Email DMARC Policy

For transactional emails, it's recommended to use a p=quarantine or p=reject policy to ensure only authenticated messages are delivered. This is especially important for sensitive transactional messages like password resets and financial notifications.

A DMARC record for transactional email subdomains might look like this:

"v=DMARC1; p=reject; rua=mailto:dmarc-aggregate@example.com; fo=1"

This record specifies a reject policy for messages that fail SPF or DKIM alignment and requests aggregate reports for all authentication results.

Marketing Email DMARC Policy

For marketing emails, a more gradual approach to DMARC enforcement is often recommended to avoid disrupting legitimate email campaigns. Many organizations start with a p=none policy to gather baseline authentication data before moving to p=quarantine and eventually p=reject.

A DMARC record for marketing email domains might look like this:

"v=DMARC1; p=none; rua=mailto:dmarc-aggregate@example.com; ruf=mailto:dmarc-afrf@example.com"

This record specifies a monitor-only policy with both aggregate and forensic reporting enabled. This allows you to identify and correct any authentication issues before moving to a stricter policy.

Subdomain Policy Overrides

In some cases, you may want to specify a different DMARC policy for subdomains than for the organizational domain. This can be done using the sp directive.

For example, to use a reject policy for the organizational domain but a quarantine policy for subdomains, you could use a record like this:

"v=DMARC1; p=reject; sp=quarantine; rua=mailto:dmarc-aggregate@example.com"

This allows for more granular control over subdomain policies while still maintaining a strict policy for the organizational domain.

Implementing Email Authentication

Now that we've covered the key differences between transactional and marketing email authentication, let's walk through the steps to implement SPF, DKIM, and DMARC for your domains.

Step 1: Identify All Email Sources

The first step in implementing email authentication is to identify all sources that send email on behalf of your domain. This includes:

  • Your own mail servers and IP addresses
  • Third-party email service providers (ESPs) like Mailchimp, Constant Contact, etc.
  • Transactional email providers like Sendgrid, Mailgun, etc.
  • Any other services or applications that send email using your domain

Create a comprehensive inventory of all email sources along with their IP addresses or hostnames. You'll need this information to create accurate SPF and DKIM records.

Step 2: Configure SPF Records

Once you have a list of all email sources, you can create SPF records for your organizational domain and any subdomains used for email.

Start by creating a record for your organizational domain that includes all authorized IP addresses and hostnames. For example:

"v=spf1 ip4:192.168.1.1 ip4:192.168.1.2 include:_spf.google.com include:sendgrid.net -all"
Was this guide helpful?
Need More Help?

Our team of email deliverability experts is available to help you implement these best practices.

Contact Us