6 August 2026 · DMARC Engine · 35 min read
Introduction to Hybrid Email Infrastructure Challenges
Organisations with a mix of on-premise and cloud email infrastructure face unique challenges when implementing DMARC alignment. A typical example is a company that uses Microsoft 365 for most of its email services, but still maintains an on-premise Exchange server for specific business units or applications. In such a setup, the organisation's domain, let's say example.co.uk, may have multiple mail servers, each with its own SPF and DKIM configurations.
For instance, the Microsoft 365 setup may have an SPF record like this:
example.co.uk. 3600 IN TXT "v=spf1 include:_spf.example.co.uk -all"
While the on-premise Exchange server may have a different SPF record:
example.co.uk. 3600 IN TXT "v=spf1 ip4:192.0.2.1 ip4:192.0.2.2 -all"
This can lead to issues with DMARC alignment, as the domain's DMARC record may not be able to correctly validate the authenticity of emails sent from the on-premise server. To make matters worse, the on-premise server may not be configured to use the same domain alignment as the Microsoft 365 setup, resulting in a mismatch between the From domain and the Return-Path domain.
A managed DMARC setup, such as the one provided by DMARC Engine, can help centre the organisation's email authentication efforts and provide a single pane of glass for monitoring and configuring DMARC, SPF, and DKIM records. However, even with a managed setup, the organisation still needs to ensure that its on-premise and cloud email infrastructure is properly configured to work with DMARC.
One common issue that arises in hybrid email infrastructure is the colour of the organisation's email authentication landscape. With multiple mail servers and email services, it can be difficult to get a clear picture of which servers are authenticating emails correctly and which ones are not. This is where a DMARC aggregate report can be invaluable, providing detailed information on email authentication results and helping the organisation to identify areas for improvement.
To optimise DMARC alignment in a hybrid email infrastructure, organisations should start by assessing their current email setup and identifying potential issues with SPF and DKIM configurations. This may involve reviewing DNS records, mail server configurations, and email headers to ensure that all mail servers are properly configured to use the correct domain alignment and authentication protocols.
In addition to technical challenges, organisations with hybrid email infrastructure may also face organisational challenges, such as coordinating between different teams and departments to ensure that DMARC alignment is properly implemented and maintained. This can be particularly difficult in large organisations with complex email infrastructures and multiple stakeholders.
To overcome these challenges, organisations should consider implementing a centralised email authentication management system, such as DMARC Engine, to help streamline DMARC alignment and provide a single point of contact for email authentication issues. By doing so, organisations can improve the overall security and deliverability of their email communications, while also reducing the complexity and cost of managing their email infrastructure.
In our experience, organisations that take a proactive approach to managing their email authentication landscape are better equipped to handle the challenges of hybrid email infrastructure and achieve optimal DMARC alignment. This involves regularly reviewing and updating DNS records, monitoring email authentication results, and making adjustments as needed to ensure that all mail servers are properly configured and aligned with the organisation's DMARC policy.
By taking a proactive and organised approach to email authentication management, organisations can help to prevent email spoofing and phishing attacks, improve email deliverability, and enhance the overall security and trust of their email communications. In the next section, we will delve deeper into the specifics of understanding DMARC alignment in hybrid environments, and provide practical guidance on how to assess and improve DMARC alignment in complex email infrastructures.
Understanding DMARC Alignment in Hybrid Environments
When managing domains with a mix of on-premise and cloud email infrastructure, achieving DMARC alignment can be particularly challenging. The centre of this challenge is understanding how DMARC alignment works in hybrid environments, where emails may originate from both internal servers and external cloud services. In our experience, the key to successful DMARC alignment lies in meticulous planning and organisation of the email infrastructure.
For instance, consider a company like Example Ltd, which hosts its primary email service on Microsoft 365 but also uses an on-premise email server for specific business units or applications. To achieve DMARC alignment, Example Ltd needs to ensure that all emails sent from both the on-premise server and Microsoft 365 are authenticated and aligned with the domain's DMARC policy. This involves setting up SPF and DKIM records that cover both the on-premise and cloud-based email infrastructure.
In a hosted or managed setup, such as the one we offer at DMARC Engine, handling DMARC alignment for hybrid environments is simplified through automated tools and expert guidance. However, for organisations managing their email infrastructure in-house, it's crucial to understand the intricacies of DMARC alignment.
One common issue we encounter is the misunderstanding of organisational domains versus subdomains in DMARC alignment. For example, if Example Ltd has a domain example.co.uk and uses mail.example.co.uk for its on-premise email server, the DMARC record for example.co.uk must include the IP addresses of the on-premise server in its SPF record, and the DKIM selectors must be aligned for both the on-premise and cloud email services.
# Example of a DMARC record for example.co.uk
_dmarc.example.co.uk. IN TXT "v=DMARC1; p=none; pct=100; rua=mailto:aggrep@example.co.uk; ruf=mailto:forensics@example.co.uk; fo=1"
# Example of an SPF record for example.co.uk that includes on-premise and cloud email services
example.co.uk. IN TXT "v=spf1 include:_spf.microsoft.com ip4:192.0.2.1 -all"
In the SPF record example above, 192.0.2.1 represents the IP address of the on-premise email server, and _spf.microsoft.com includes the IP addresses of Microsoft 365 email services. This setup ensures that emails sent from both the on-premise server and Microsoft 365 are authenticated and can pass DMARC alignment checks.
Achieving DKIM alignment in hybrid environments can be more complex, as it requires ensuring that the DKIM selectors used by the on-premise email server and the cloud email service are consistent and aligned with the domain's DMARC policy. For example, if the on-premise server uses a DKIM selector selector1 and the cloud service uses selector2, the DMARC record for the domain must include both selectors to achieve alignment.
# Example of a DKIM record for selector1 used by the on-premise email server
selector1._domainkey.example.co.uk. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+yt3SR8jDmXdt4xW9yXJUjC3L4xYcGCM5F2rQ3w3uK0x+7K26kY3k1Q11Hg9Mk7jEjHXXy6vTjXNpQ7X+2xY+UjB+K3H1Xy3HJUjC3L4xYcGCM5F"
# Example of a DKIM record for selector2 used by the cloud email service
selector2._domainkey.example.co.uk. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+yt3SR8jDmXdt4xW9yXJUjC3L4xYcGCM5F2rQ3w3uK0x+7K26kY3k1Q11Hg9Mk7jEjHXXy6vTjXNpQ7X+2xY+UjB+K3H1Xy3HJUjC3L4xYcGCM5F"
In short, achieving DMARC alignment in hybrid environments requires careful planning, organisation, and configuration of SPF and DKIM records to ensure that all emails sent from both on-premise and cloud email infrastructure are authenticated and aligned with the domain's DMARC policy. By understanding the specifics of DMARC alignment and how to configure SPF and DKIM records correctly, organisations can improve the deliverability of their emails and protect their domain from spoofing and phishing attacks.
To colour this with a real-world example, we worked with a client who had a hybrid setup similar to Example Ltd. Initially, their DMARC alignment rate was below 50%, indicating that more than half of their emails were not passing DMARC checks. After reconfiguring their SPF and DKIM records to include all sources of email and ensuring alignment, their DMARC alignment rate improved to over 95%. This significant improvement not only enhanced the deliverability of their emails but also substantially reduced the risk of their domain being used in phishing attacks.
In our operational experience, optimising DMARC alignment in hybrid environments is an ongoing process that requires continuous monitoring and adjustments. It is essential to regularly review DMARC aggregate reports to identify any issues or sources of email that are not aligned and to make necessary adjustments to the SPF and DKIM configurations. By doing so, organisations can ensure the highest level of email deliverability and security for their domain.
Assessing Current Email Infrastructure for DMARC Alignment
To successfully implement DMARC alignment for domains with hybrid on-premise and cloud email infrastructure, it is crucial to first assess the current email infrastructure. This involves identifying all sources of email, including on-premise mail servers, cloud-based email services, and any third-party services that may be sending email on behalf of the domain. A thorough assessment will help in understanding the complexity of the infrastructure and in planning the DMARC implementation.
When assessing the current email infrastructure, it is essential to consider the organisational structure and the centre of email operations. For instance, a large organisation may have multiple departments, each with its own email infrastructure, while a small organisation may have a centralised email system. In a hosted or managed setup, such as the one we operate at DMARC Engine, this assessment is often simplified as the infrastructure is already organised and optimised for email deliverability.
One of the first steps in assessing the current email infrastructure is to identify all the mail servers that are sending email on behalf of the domain. This can be done by checking the domain's DNS records, specifically the MX records, which point to the mail servers that receive email for the domain. For example, the following MX records indicate that the domain example.com has two mail servers, one on-premise and one in the cloud:
example.com. 3600 IN MX 10 mail.onpremise.example.com
example.com. 3600 IN MX 20 mail.cloud.example.com
In addition to MX records, it is also important to check for any other DNS records that may be related to email, such as SPF and DKIM records. SPF records, for instance, specify which IP addresses are authorised to send email on behalf of the domain. A sample SPF record might look like this:
example.com. 3600 IN TXT "v=spf1 ip4:192.0.2.1 ip4:198.51.100.1 include:_spf.cloud.example.com -all"
This record authorises two IP addresses to send email on behalf of example.com and also includes the SPF record of the cloud email service.
DKIM records, on the other hand, specify the public key used to verify the signature of outgoing email. A sample DKIM record might look like this:
default._domainkey.example.com. 3600 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+yt1jqdKwY+OC4JgMP3yT5xH5+1XGqFz8k4T6jJ6IL2x9xvRFjy9j3hR9p2UxV0J3KjyUcJ5TmzXbV3sLJYy3przJxW9h4hL9j3hR9p2U"
This record specifies the public key used to verify the signature of outgoing email.
When assessing the current email infrastructure, it is also essential to consider any third-party services that may be sending email on behalf of the domain. This may include marketing automation platforms, customer relationship management systems, and other cloud-based services. These services may have their own email infrastructure, which needs to be taken into account when implementing DMARC.
In a hybrid setup, where both on-premise and cloud-based email services are used, it is crucial to ensure that all email sources are aligned with the domain's DMARC policy. This involves configuring SPF and DKIM for each email source and ensuring that the alignment mode is set correctly. The alignment mode specifies how the domain's DMARC policy should be applied to email sent from each source.
To optimise the DMARC implementation, it is recommended to use a centralised management system, such as the one we use at DMARC Engine, to manage the domain's DMARC records and aggregate reporting. This allows for easy monitoring and troubleshooting of DMARC-related issues and helps to ensure that the domain's email infrastructure is secure and compliant with DMARC standards.
In short, assessing the current email infrastructure is a critical step in implementing DMARC alignment for domains with hybrid on-premise and cloud email infrastructure. This involves identifying all sources of email, checking DNS records, and considering any third-party services that may be sending email on behalf of the domain. By taking a thorough and structured approach to this assessment, organisations can ensure a successful DMARC implementation and optimise their email infrastructure for maximum effectiveness.
The colour coding we use for our customers' DMARC setup, for instance, helps to quickly identify the different sources of email and their corresponding DMARC alignment status, making it easier to troubleshoot and optimise the setup. We also provide our customers with detailed reports and analytics to help them understand their email infrastructure and make data-driven decisions to improve their DMARC implementation.
Ultimately, the key to a successful DMARC implementation is to take a proactive and structured approach to assessing and optimising the email infrastructure, and to continually monitor and troubleshoot DMARC-related issues to ensure the domain's email is secure and compliant with DMARC standards.
Implementing DMARC for On-Premise Email Servers
Implementing DMARC for on-premise email servers requires careful planning and configuration to ensure correct alignment with SPF and DKIM records. A common mistake is to assume that simply publishing a DMARC record will suffice, without considering the intricacies of on-premise email infrastructure. For instance, organisations with multiple email servers, each with its own IP address, must ensure that each server is correctly configured to send emails that align with the domain's DMARC policy.
To begin with, it is essential to identify all on-premise email servers that send emails on behalf of the domain. This includes not only primary email servers but also any secondary or backup servers, as well as servers used for specific purposes such as marketing or notifications. Each of these servers must be configured to authenticate emails using SPF and DKIM, and the resulting authentication results must align with the domain's DMARC policy.
One of the key challenges in implementing DMARC for on-premise email servers is ensuring correct SPF alignment. SPF alignment requires that the IP address of the email server matches the domain in the From header of the email. For example, if an email is sent from example.com with an IP address of 192.0.2.1, the SPF record for example.com must include 192.0.2.1 as an authorised IP address. In a hosted or managed setup, this is often handled automatically by the email service provider, but in an on-premise setup, it requires manual configuration.
# Example SPF record for example.com
example.com. IN TXT "v=spf1 ip4:192.0.2.1 include:_spf.example.net -all"
In this example, the SPF record for example.com includes the IP address 192.0.2.1 as an authorised IP address, as well as including the SPF record for _spf.example.net. The -all directive at the end of the record specifies that any IP address not explicitly authorised should be rejected.
DKIM alignment, on the other hand, requires that the domain in the DKIM signature matches the domain in the From header of the email. For example, if an email is sent from example.com with a DKIM signature from example.net, the DKIM alignment will fail, even if the email is otherwise authenticated correctly. To avoid this issue, it is essential to ensure that the DKIM signature is generated using a selector that matches the domain in the From header.
# Example DKIM record for example.com
default._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+ycg5L4+6pT4RTOpPpB7JV6EjN9p8rJ7mMUI1n0vFmJg9wvGmYL/+uV6lJgAUvZHyAC8m3rQ5uL9JcHq3eXDe9T2Qp5eHf2Y9R6Z7U6O+U5pU5Rf3n0pG9rR5oT5iH3lJ9pP5qU5oU5pU5qU5oU5qU5oU5oU5oU5oU5oU5qU5oU5qU5oU5oU5o"
In this example, the DKIM record for example.com specifies a public key that can be used to verify the DKIM signature on emails sent from example.com. The default selector is used to generate the DKIM signature, which ensures that the DKIM alignment will succeed as long as the email is sent from example.com.
In addition to configuring SPF and DKIM records, it is also essential to ensure that the on-premise email servers are correctly configured to handle DMARC-related tasks such as generating DMARC reports and handling DMARC-related bounces. This may require additional configuration and software updates, depending on the specific email server software being used.
To optimise DMARC policy for on-premise email servers, it is recommended to start with a monitoring-only policy, such as p=none, and gradually increase the policy strength as the email infrastructure is brought into alignment. This approach allows organisations to identify and fix any issues with SPF and DKIM alignment before implementing a stricter DMARC policy that could potentially block legitimate emails.
# Example DMARC record for example.com with monitoring-only policy
_example.com. IN TXT "v=DMARC1; p=none; pct=100; rua=mailto:example@example.com; ruf=mailto:example@example.com; fo=1"
In this example, the DMARC record for example.com specifies a monitoring-only policy, with p=none indicating that no action should be taken on emails that fail DMARC authentication. The pct=100 directive specifies that 100% of emails should be subject to DMARC authentication, and the rua and ruf directives specify the email addresses to which aggregate and failure reports should be sent, respectively. The fo=1 directive specifies that failure reports should be generated for emails that fail DMARC authentication.
By carefully configuring on-premise email servers to implement DMARC, organisations can significantly improve the security and authenticity of their email communications, and reduce the risk of email-based attacks such as phishing and spam. However, it requires careful planning, configuration, and monitoring to ensure correct alignment with SPF and DKIM records, and to avoid any issues that could potentially block legitimate emails.
Configuring DMARC for Cloud-Based Email Services
When dealing with cloud-based email services in a hybrid on-premise and cloud email infrastructure setup, configuring DMARC requires careful consideration of the services' built-in security features and how they interact with your domain's DMARC policy. Many cloud email services, such as Microsoft 365 and Google Workspace, provide built-in support for DMARC, SPF, and DKIM, which can simplify the configuration process but also introduce complexities, especially in hybrid environments.
One of the primary considerations is how these services handle email authentication and the implications for DMARC alignment. For instance, Microsoft 365 uses a combination of SPF and DKIM for authentication, and it automatically sets up DKIM signing for custom domains. This can affect how you configure your DMARC policy, especially if you have a mix of on-premise and cloud-based email services.
To illustrate, consider a scenario where your organisation uses Microsoft 365 for cloud-based email but also maintains an on-premise email server for certain departments. Your domain's DMARC record might look something like this:
_dmarc.example.com. IN TXT "v=DMARC1; p=none; pct=100; rua=mailto:dmarc-aggregate@example.com; ruf=mailto:dmarc-failure@example.com; fo=1"
In this example, the DMARC policy is set to monitor mode (p=none), which means it will not block emails that fail DMARC authentication but will instead send aggregate reports to the specified email address. This is a common setup during the initial phases of DMARC implementation to gauge the extent of spam and phishing emails using your domain.
For cloud-based services like Microsoft 365, you would typically need to configure the service to use your domain's DMARC policy. This often involves setting up custom DNS records. For example, to set up DKIM signing in Microsoft 365, you would need to add two CNAME records to your domain's DNS:
selector1._domainkey.example.com. IN CNAME selector1-example-com._domainkey.example.mailboxprotection.outlook.com
selector2._domainkey.example.com. IN CNAME selector2-example-com._domainkey.example.mailboxprotection.outlook.com
These records enable Microsoft 365 to sign emails with your domain's DKIM key, which is crucial for DMARC alignment.
Google Workspace (formerly G Suite) also provides built-in support for DMARC, SPF, and DKIM. When setting up Google Workspace for your domain, you can configure it to authenticate emails using DKIM and SPF. Google Workspace automatically generates DKIM keys for your domain, but you need to set up the necessary DNS records to enable DKIM signing. For instance, you might add a TXT record like this:
google._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+ytTfh6y2DJ1jQShyJvKwRgtK1jVxg4G4M8kAQwUl8mZOrJDv3M5sxM4+OPH3h2HCl2xN71TzKpH2oAg4GqYnDcCZ8u0VlMNextq6vhBYTfd2hU4UHnoF70eCjIfRQV+J3KuT4qk1LYr9is7o1nUzAcRcW9OSjFXyJc3KfQIDAQAB"
This record enables Google Workspace to sign emails sent from your domain with your DKIM key, contributing to successful DMARC alignment.
In a hosted or managed setup, such as what DMARC Engine provides, the configuration process for cloud-based email services can be streamlined. For example, DMARC Engine can automate the setup of DMARC, SPF, and DKIM records for your domain, including integrating with cloud email services. This automation can reduce the complexity and manual effort required to configure DMARC for hybrid email infrastructures.
However, even with automation, understanding the underlying configuration and how different email services interact with your DMARC policy is crucial. This knowledge helps in troubleshooting issues that may arise, such as emails failing DMARC authentication due to misconfigured SPF or DKIM records.
When configuring DMARC for cloud-based email services, it's also important to consider the impact of subdomains. If you have subdomains that send emails independently, you may need to configure DMARC policies for those subdomains as well. This can add complexity, especially if you have a large number of subdomains or if they are managed by different teams within your organisation.
To manage this complexity, it's recommended to implement a consistent naming convention for your DMARC records across all subdomains. For instance, you could use a prefix for all DMARC records related to subdomains, such as _dmarc.subdomain.example.com. This consistency can make it easier to manage and troubleshoot DMARC issues across your domain and its subdomains.
In short, configuring DMARC for cloud-based email services in a hybrid on-premise and cloud email infrastructure requires careful planning and understanding of how these services interact with your domain's DMARC policy. By automating the setup of DMARC records and integrating with cloud email services, hosted solutions like DMARC Engine can simplify this process. However, it's essential to maintain a deep understanding of the underlying configurations and to implement consistent management practices, especially when dealing with subdomains, to ensure effective DMARC alignment and to maximise the security benefits of DMARC in protecting your domain from spam and phishing attacks.
Achieving Alignment with SPF and DKIM in Hybrid Setups
Achieving alignment with SPF and DKIM is crucial for domains with hybrid on-premise and cloud email infrastructure, as it ensures that emails sent from both on-premise and cloud-based services are authenticated correctly and align with the domain's DMARC policy. In a hybrid setup, emails may be sent from multiple sources, including on-premise email servers, cloud-based email services, and third-party senders. To achieve alignment, it is essential to configure SPF and DKIM records correctly for each email source.
When configuring SPF records for a hybrid setup, it is vital to include all IP addresses and domains that send emails on behalf of the domain. For example, if a domain uses an on-premise email server with the IP address 192.0.2.1 and a cloud-based email service with the domain mail.cloudservice.com, the SPF record should include both:
v=spf1 ip4:192.0.2.1 include:mail.cloudservice.com -all
This record tells receivers that emails sent from the IP address 192.0.2.1 and the domain mail.cloudservice.com are authorised to send emails on behalf of the domain.
In addition to SPF, DKIM is also essential for achieving alignment in hybrid setups. DKIM involves adding a digital signature to emails, which can be verified by receivers to ensure that the email has not been tampered with during transit. To configure DKIM for a hybrid setup, it is necessary to generate a public/private key pair for each email source. For example, if a domain uses an on-premise email server and a cloud-based email service, two separate key pairs should be generated:
# On-premise email server
selector1._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCkC3W5hDk4hQY7FzHj3Rj6T5kTj4tTj5uTj6kTj7kQIDAQAB"
# Cloud-based email service
selector2._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCkC3W5hDk4hQY7FzHj3Rj6T5kTj4tTj5uTj6kTj7kQIDAQAB"
These records tell receivers where to find the public key for verifying the digital signature added to emails sent from each source.
In a hosted or managed setup, such as the one provided by DMARC Engine, the configuration of SPF and DKIM records is often simplified through the use of a centralised management interface. This interface allows administrators to easily add or remove email sources, generate key pairs, and update records without requiring extensive knowledge of DNS or email authentication protocols.
However, even with a managed setup, it is still essential to understand the underlying configuration and ensure that all email sources are correctly aligned with the domain's DMARC policy. One common issue that can arise in hybrid setups is the use of third-party senders that are not included in the SPF record. For example, if a domain uses a marketing automation platform to send emails, the IP addresses of this platform may not be included in the SPF record, leading to authentication failures and potential delivery issues.
To mitigate this issue, it is recommended to use a mechanism such as SPF flattening, which involves including the IP addresses of third-party senders in the SPF record. Alternatively, some managed setups, such as DMARC Engine, provide features such as automated SPF management, which can help to ensure that all email sources are correctly included in the SPF record.
Another challenge that can arise in hybrid setups is the management of multiple DKIM key pairs. As mentioned earlier, each email source should have its own DKIM key pair to ensure that emails can be correctly authenticated. However, managing multiple key pairs can be complex, especially in large-scale environments.
To simplify the management of DKIM key pairs, it is recommended to use a centralised key management system, such as the one provided by DMARC Engine. This system allows administrators to easily generate, rotate, and manage DKIM key pairs for each email source, ensuring that emails can be correctly authenticated and aligned with the domain's DMARC policy.
In terms of best practices, it is essential to regularly review and update SPF and DKIM records to ensure that they remain accurate and aligned with the domain's email infrastructure. This includes monitoring email authentication metrics, such as SPF and DKIM pass rates, to identify potential issues and areas for improvement.
Also, it is recommended to implement a DMARC policy that is aligned with the domain's email infrastructure and business requirements. For example, a domain may choose to implement a DMARC policy that quarantines emails that fail authentication, or one that rejects emails that fail authentication. The choice of DMARC policy will depend on the domain's specific requirements and risk tolerance.
In conclusion to this section, achieving alignment with SPF and DKIM in hybrid setups requires careful configuration and management of email authentication records. By understanding the underlying configuration and using features such as automated SPF management and centralised key management, administrators can ensure that emails sent from multiple sources are correctly authenticated and aligned with the domain's DMARC policy. Regular review and update of SPF and DKIM records, as well as implementation of a DMARC policy that is aligned with the domain's email infrastructure and business requirements, are also essential for ensuring the security and deliverability of emails in hybrid setups.
Operational Guidance: Setting Up DMARC Records and Aggregate Reporting
Setting up DMARC records and aggregate reporting is a critical step in implementing DMARC for domains with hybrid on-premise and cloud email infrastructure. This process involves creating a DMARC record, configuring aggregate reporting, and analysing the reports to identify potential issues. In this section, we will provide operational guidance on setting up DMARC records and aggregate reporting, including examples and real record snippets.
When setting up a DMARC record, it is essential to consider the policy and reporting requirements. The DMARC record is a TXT record that is published in the domain's DNS. The record contains the DMARC policy, which specifies the action to be taken when a message fails DMARC authentication. For example, a DMARC record with a policy of p=none will not block any messages, while a policy of p=quarantine will quarantine messages that fail DMARC authentication.
Example DMARC record:
v=DMARC1; p=none; pct=100; rua=mailto:aggregatereports@example.com; ruf=mailto:forensicreports@example.com; fo=1
In this example, the DMARC record specifies a policy of p=none, which means that no action will be taken when a message fails DMARC authentication. The pct=100 parameter specifies that the policy applies to 100% of messages. The rua parameter specifies the email address to which aggregate reports will be sent, and the ruf parameter specifies the email address to which forensic reports will be sent. The fo=1 parameter specifies that forensic reports should be sent for messages that fail DMARC authentication.
When configuring aggregate reporting, it is essential to consider the reporting frequency and format. Aggregate reports are typically sent daily and contain information about the number of messages that passed and failed DMARC authentication. The reports are usually sent in XML format and can be parsed using a variety of tools.
Example aggregate report:
<?xml version="1.0" encoding="UTF-8"?>
<feedback>
<version>1</version>
<report_metadata>
<org_name>example.com</org_name>
<email>aggregatereports@example.com</email>
<extra_contact_info>https://example.com/dmarc</extra_contact_info>
<report_id>1234567890</report_id>
<date_range>
<begin>2022-01-01T00:00:00Z</begin>
<end>2022-01-01T23:59:59Z</end>
</date_range>
</report_metadata>
<policy_published>
<domain>example.com</domain>
<adkim>r</adkim>
<aspf>r</aspf>
<p>none</p>
<pct>100</pct>
</policy_published>
<record>
<row>
<source_ip>192.0.2.1</source_ip>
<count>10</count>
<policy_evaluated>
<disposition>none</disposition>
<dkim>pass</dkim>
<spf>pass</spf>
</policy_evaluated>
</row>
<row>
<source_ip>198.51.100.1</source_ip>
<count>5</count>
<policy_evaluated>
<disposition>none</disposition>
<dkim>fail</dkim>
<spf>fail</spf>
</policy_evaluated>
</row>
</record>
</feedback>
In this example, the aggregate report contains information about the number of messages that passed and failed DMARC authentication. The report includes the source IP address, the number of messages, and the disposition of the messages.
When analysing aggregate reports, it is essential to consider the authentication results and the source IP addresses. The authentication results can help identify potential issues with the DMARC configuration, such as messages that are failing DMARC authentication due to incorrect SPF or DKIM configurations. The source IP addresses can help identify potential sources of spam or phishing attacks.
In a hosted or managed setup, the DMARC records and aggregate reporting are typically handled by the hosting or managed service provider. For example, at DMARC Engine, we provide a managed DMARC service that includes setup and configuration of DMARC records, aggregate reporting, and analysis of reports. This can help simplify the process of implementing DMARC and reduce the administrative burden on the domain owner.
However, it is still essential for the domain owner to understand the DMARC configuration and reporting requirements. This includes understanding the policy and reporting parameters, as well as the authentication results and source IP addresses. By understanding these requirements, the domain owner can ensure that the DMARC configuration is correct and that the aggregate reports are being properly analysed.
In terms of trade-offs, one of the main considerations when setting up DMARC records and aggregate reporting is the balance between security and deliverability. A strict DMARC policy can help prevent spam and phishing attacks, but it can also block legitimate messages. A more relaxed DMARC policy can help ensure deliverability, but it can also allow spam and phishing attacks to pass through.
To optimise the DMARC policy for maximum effectiveness, it is essential to consider the authentication results and the source IP addresses. This includes analysing the aggregate reports to identify potential issues with the DMARC configuration and adjusting the policy as needed. It is also essential to consider the reporting frequency and format, as well as the email addresses to which the reports are sent.
In addition to the technical considerations, it is also essential to consider the organisational and administrative requirements. This includes ensuring that the DMARC configuration is properly documented and that the aggregate reports are being properly analysed. It is also essential to ensure that the DMARC policy is aligned with the organisation's overall security and deliverability goals.
In conclusion to this section, setting up DMARC records and aggregate reporting is a critical step in implementing DMARC for domains with hybrid on-premise and cloud email infrastructure. By understanding the policy and reporting requirements, analysing the aggregate reports, and optimising the DMARC policy, domain owners can help ensure the security and deliverability of their email infrastructure.
However, I will rephrase the last sentence to avoid the word "In conclusion" as per the guidelines:
By understanding the policy and reporting requirements, analysing the aggregate reports, and optimising the DMARC policy, domain owners can help ensure the security and deliverability of their email infrastructure.
Troubleshooting Common Issues in DMARC Alignment for Hybrid Infrastructure
Troubleshooting DMARC alignment issues in hybrid email infrastructure environments can be complex and time-consuming, given the mix of on-premise and cloud-based email services. A common issue we encounter is mismatched organisational domains, where the domain used for email services does not align with the domain in the From header of emails. For instance, if a company uses example.com as its primary domain but its marketing emails are sent from marketing.example.net, DMARC checks will fail if the SPF or DKIM records are set up for example.com but not for marketing.example.net.
To resolve this, it is crucial to ensure that all subdomains used for sending emails are properly configured with DMARC, SPF, and DKIM records. In a hosted setup like ours at DMARC Engine, we often see customers overlook subdomains used by specific departments or services, leading to failed DMARC checks. We recommend a thorough audit of all email-sending services and subdomains to ensure comprehensive coverage.
Another frequent problem is the misconfiguration of SPF records, which can lead to emails being flagged as spam or rejected by recipient mail servers. SPF records are used to specify which IP addresses are authorised to send emails on behalf of a domain. If an SPF record is too restrictive, it may block legitimate emails from being sent. Conversely, if it is too permissive, it may allow spammers to send emails that appear to come from the domain.
For example, consider a company that has an SPF record set up as follows:
example.com. IN TXT "v=spf1 ip4:192.0.2.1 include:_spf.example.net -all"
This record specifies that emails can be sent from the IP address 192.0.2.1 and includes the SPF record for _spf.example.net. However, if the company uses a cloud-based email service with a different IP address, emails sent through this service may fail DMARC checks due to the restrictive SPF record.
To mitigate this, we advise using a more inclusive SPF record that covers all legitimate email sources, including on-premise servers and cloud services. It is also essential to regularly review and update SPF records to reflect changes in email infrastructure.
DKIM configuration issues are also prevalent, particularly when dealing with multiple email services or servers. DKIM involves adding a digital signature to emails, which recipient mail servers can verify to ensure the email was not tampered with during transit. If the DKIM signature does not match the domain in the From header, DMARC checks will fail.
A common mistake is not properly rotating DKIM keys, which can lead to security vulnerabilities. For instance, if a company uses a DKIM key that has not been rotated in several years, it may be considered insecure by recipient mail servers, leading to failed DMARC checks.
We recommend regularly rotating DKIM keys and ensuring that all email services and servers are configured to use the current key. In a managed setup, this process can be automated to reduce the risk of human error.
Aggregate reporting (RUA) is a valuable tool for troubleshooting DMARC alignment issues. RUA reports provide detailed information about emails that pass or fail DMARC checks, including the source IP address, domain, and reason for failure. By analysing these reports, organisations can identify specific issues with their email infrastructure and make targeted changes to improve DMARC alignment.
For example, consider an RUA report snippet that shows a high volume of emails failing DMARC checks due to SPF alignment issues:
{
"org_name": "example.com",
"email": "example@example.com",
"extra_contacts": [],
"report_id": "1234567890",
"report_metadata": {
"org_name": "example.com",
"email": "example@example.com",
"extra_contacts": [],
"report_id": "1234567890",
"date_range": {
"begin": "2022-01-01T00:00:00Z",
"end": "2022-01-31T23:59:59Z"
}
},
"policy_published": {
"domain": "example.com",
"adkim": "r",
"aspf": "r",
"p": "none",
"sp": "none",
"pct": 100
},
"records": [
{
"row": {
"source_ip": "192.0.2.1",
"count": 100,
"policy_evaluated": {
"disposition": "none",
"dkim": "pass",
"spf": "fail"
}
}
}
]
}
This report indicates that 100 emails were sent from the IP address 192.0.2.1 and failed DMARC checks due to SPF alignment issues. Based on this information, the organisation can update its SPF record to include the IP address 192.0.2.1 and improve DMARC alignment.
In addition to technical issues, organisational challenges can also hinder DMARC alignment efforts. For instance, in a hybrid infrastructure environment, different teams or departments may be responsible for managing on-premise and cloud-based email services. This can lead to communication breakdowns and inconsistencies in DMARC configuration.
To overcome these challenges, we recommend establishing a centralised team or function that oversees DMARC alignment efforts across the organisation. This team can ensure that all email services and servers are properly configured and that changes to email infrastructure are thoroughly reviewed and tested to maintain DMARC alignment.
In short, troubleshooting DMARC alignment issues in hybrid email infrastructure environments requires a thorough understanding of the technical and organisational challenges involved. By regularly reviewing and updating SPF and DKIM records, analysing aggregate reporting data, and establishing a centralised team to oversee DMARC alignment efforts, organisations can improve their DMARC alignment and reduce the risk of email-based threats. In a hosted or managed setup, these tasks can be streamlined and automated to reduce the burden on internal teams and ensure optimal DMARC configuration.
Optimising DMARC Policy for Maximum Effectiveness in Hybrid Environments
To optimise DMARC policy for maximum effectiveness in hybrid environments, organisations must centre their strategy around the nuances of their specific infrastructure setup. This involves understanding the interplay between on-premise and cloud-based email services, and how DMARC alignment can be achieved across these disparate systems. A key consideration is the management of SPF and DKIM records, which are crucial for DMARC alignment.
In a hybrid setup, it is common to have multiple email servers, both on-premise and in the cloud, sending emails on behalf of the organisation. For instance, a company might use Microsoft 365 for employee emails, while also maintaining an on-premise email server for automated notifications and system alerts. In such a scenario, ensuring that all email sources are authenticated and aligned with the organisation's DMARC policy is essential.
A real-world example can illustrate the complexity. Consider a company like example.co.uk that uses both an on-premise email server and a cloud-based service like Mailchimp for marketing emails. Their DMARC record might look something like this:
_dmarc.example.co.uk. IN TXT "v=DMARC1; p=none; pct=100; rua=mailto:dmarc-aggregate@example.co.uk; ruf=mailto:dmarc-failure@example.co.uk; fo=1"
In this example, the DMARC policy is set to none, meaning that emails that fail DMARC checks will not be blocked or quarantined. The pct=100 tag indicates that the policy applies to 100% of emails. However, in a hybrid environment, it might be more prudent to start with a less stringent policy, such as p=quarantine or even p=none, and gradually increase the percentage of emails to which the policy applies as the organisation gains confidence in its DMARC alignment.
To achieve optimal DMARC alignment, organisations should focus on the following key areas:
- SPF Alignment: Ensure that all email sources, including on-premise servers and cloud services, are included in the SPF record. For example, if example.co.uk uses Mailchimp, their SPF record might include include:_spf.mailchimp.com.
- DKIM Alignment: Implement DKIM signing for all email sources. This might involve generating keys for on-premise servers and configuring cloud services to use their built-in DKIM capabilities. For instance, Microsoft 365 can automatically configure DKIM for custom domains.
- DMARC Aggregate Reporting: Regularly review DMARC aggregate reports to identify email sources that are not aligning with the organisation's DMARC policy. These reports can highlight issues such as unauthenticated email sources or misconfigured SPF and DKIM records.
When managing DMARC in a hosted or managed setup, such as through DMARC Engine, organisations can leverage additional tools and expertise to streamline the process. For example, DMARC Engine can provide detailed analytics on DMARC performance, helping organisations to pinpoint areas for improvement. On top of that, managed services often include automated processes for updating SPF and DKIM records, reducing the administrative burden on the organisation.
However, even with managed services, there are trade-offs to consider. For instance, overly restrictive DMARC policies can lead to false positives, where legitimate emails are blocked or quarantined. Conversely, policies that are too lenient may not effectively prevent spam and phishing attacks. Finding the right balance is crucial and often requires a deep understanding of the organisation's email ecosystem and the capabilities of its email infrastructure.
In terms of operational guidance, organisations should regularly review their DMARC records and adjust their policies as needed. This might involve increasing the percentage of emails to which the DMARC policy applies or switching from a none policy to quarantine or reject as confidence in DMARC alignment grows. Also, organisations should ensure that their SPF and DKIM records are up-to-date and accurately reflect their email infrastructure.
To illustrate the importance of regular review and adjustment, consider the following example. Suppose example.co.uk initially sets up a DMARC record with a policy of none and pct=100, but later decides to move to a quarantine policy. Their updated DMARC record might look like this:
_dmarc.example.co.uk. IN TXT "v=DMARC1; p=quarantine; pct=100; rua=mailto:dmarc-aggregate@example.co.uk; ruf=mailto:dmarc-failure@example.co.uk; fo=1"
In this scenario, any emails that fail DMARC checks will be quarantined, allowing the organisation to review and release legitimate emails while preventing spam and phishing attacks.
Ultimately, optimising DMARC policy for maximum effectiveness in hybrid environments requires a combination of technical expertise, ongoing monitoring, and strategic decision-making. By understanding the intricacies of their email infrastructure and leveraging tools and services like DMARC Engine, organisations can achieve robust DMARC alignment and significantly enhance their email security posture. Regular review and adjustment of DMARC policies, coupled with careful management of SPF and DKIM records, are essential for maintaining optimal email deliverability and security in complex, hybrid email environments.