DMARC Engine
Home/Blog/DKIM Key Management for Organisations with Mergers and Acquisitions
Blog

DKIM Key Management for Organisations with Mergers and Acquisitions

Merging email infrastructures poses DKIM key management challenges, requiring careful planning to maintain email deliverability. Organisations must navigate complex DKIM key landscapes during mergers and acquisitions

20 September 2026 · DMARC Engine · 33 min read

DKIM Key Management for Organisations with Mergers and Acquisitions

Merging Email Infrastructures: The DKIM Key Conundrum

When organisations undergo mergers and acquisitions, their email infrastructures often become intertwined, leading to a complex DKIM key management landscape. This can result in a colour of confusion, as multiple domains, mail servers, and DKIM keys are suddenly required to work in harmony. A key consideration is how to manage the existing DKIM keys, as simply merging them can lead to a loss of control and potentially compromise email deliverability.

For instance, consider a scenario where Company A, with the domain companya.com, acquires Company B, which owns companyb.com. Both companies have their own DKIM keys, and their respective mail servers are configured to use these keys for signing outgoing emails. The DKIM key for companya.com might look like this:

default._domainkey.companya.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+yt1OiA6XKPEi60vM0esQNTj80fNTFxGg7qo9VbP4mV4tXFH8QqVfeyahm8nWcNfQKJ6xP8X3/1h9o0/1E7m9FJi5wPTX8jH8uT3jK3sJYPHJku4r1O9r0tY3Y7yXJFQUR1v6M9pZwz3Vtctg1UcNY4xm7ms9N" 

Meanwhile, the DKIM key for companyb.com might be:

selector._domainkey.companyb.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3f9S7Oq9VbP4mV4tXFH8QqVfeyahm8nWcNfQKJ6xP8X3/1h9o0/1E7m9FJi5wPTX8jH8uT3jK3sJYPHJku4r1O9r0tY3Y7yXJFQUR1v6M9pZwz3Vtctg1UcNY4xm7ms9N8gJW0n7KuQIDAQAB"

In a hosted or managed setup, such as the one provided by DMARC Engine, the organisation can opt to manage these keys centrally, thereby optimising their email infrastructure and reducing the risk of human error. However, this requires careful planning and coordination to ensure a seamless transition.

One of the primary challenges in merging email infrastructures is deciding which DKIM keys to retain and which to retire. Retaining all existing keys can lead to a complex key management system, making it difficult to maintain and update keys as needed. On the other hand, retiring keys without proper planning can result in email delivery issues, as some mail servers may still be configured to use the retired keys.

To mitigate this risk, organisations can implement a phased approach to DKIM key management. This involves identifying all existing DKIM keys, assessing their usage, and developing a plan to consolidate or retire keys as necessary. For example, if companya.com and companyb.com have similar email volumes and infrastructure, it may be feasible to consolidate their DKIM keys into a single, new key. However, if the email volumes and infrastructure differ significantly, it may be more practical to maintain separate DKIM keys for each domain.

In addition to managing DKIM keys, organisations must also consider the impact of mergers and acquisitions on their SPF and DMARC records. For instance, if companya.com and companyb.com have different SPF records, these will need to be consolidated or updated to reflect the new email infrastructure. This might involve adding new IP addresses or mail servers to the SPF record, or modifying the existing record to include the merged infrastructure.

A hosted or managed setup can provide significant benefits in this regard, as it allows organisations to centralise their email infrastructure management and optimise their SPF and DMARC records for better deliverability. By leveraging the expertise of a managed service provider, organisations can ensure a smoother transition and reduce the risk of email delivery issues.

Ultimately, the key to successful DKIM key management in a merged email infrastructure is careful planning, coordination, and attention to detail. Organisations must take a pragmatic approach to assessing their current state, identifying areas for improvement, and developing a tailored strategy for managing their DKIM keys. By doing so, they can ensure a seamless transition, maintain email deliverability, and optimise their email infrastructure for long-term success.

In our experience at DMARC Engine, a centralised approach to DKIM key management is often the most effective way to manage complex email infrastructures, particularly in the context of mergers and acquisitions. This allows organisations to maintain control over their DKIM keys, ensure consistent email authentication, and simplify their email infrastructure management. As we will discuss in the following sections, a well-planned DKIM key management strategy is critical to ensuring email deliverability and security in merged organisations.

Assessing the Current State: A Pragmatic Approach to DKIM Key Inventory

When dealing with mergers and acquisitions, organisations often face the daunting task of consolidating their email infrastructures, which includes managing DomainKeys Identified Mail (DKIM) keys. A crucial first step in this process is to assess the current state of DKIM key usage across all domains and email services. This involves taking a thorough inventory of existing DKIM keys, including those used by the acquiring and acquired companies. In our experience, a hosted DKIM setup can simplify this process by providing a centralised interface to manage keys, but it is essential to understand the underlying mechanics to make informed decisions.

To begin the assessment, organisations should gather all relevant DNS records, specifically the TXT records that contain the DKIM public keys. For example, a typical DKIM key record might look like this:

default._domainkey.example.com. 3600 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq4j4hWbE7HjGK2Jj6KxY4tP4PjXhQxN7N3Y9FQ1QjN3Y9FQ1QjN7N3Y9F5QjN7N3Y9FQ1QjN7N3Y9FQ1QjN4j4hWbE7HjGK2Jj6KxY4tP4PjXhQxN7N3Y9FQ1Q"

It is crucial to note the selector (default in this case), the domain (example.com), and the key itself. The selector is used to differentiate between multiple keys for the same domain, allowing for key rotation and other management strategies.

In a merger scenario, organisations may encounter a colour palette of DKIM key management practices, ranging from well-organised to completely disorganised. We have seen cases where companies use a single key across all their domains, while others use a unique key for each domain or even for specific email services like marketing campaigns. A pragmatic approach involves categorising these keys based on their usage, such as:

  • Keys used for general email services (e.g., corporate email)
  • Keys used for specific services (e.g., marketing automation platforms)
  • Keys that are no longer in use but still published in DNS

For organisations with a large number of domains and email services, this process can be time-consuming and prone to errors. Utilising scripts or tools to automate the collection and analysis of DKIM keys can optimise this process. For instance, a Python script can be used to query DNS records and parse the results to identify unique selectors and keys.

In a managed DKIM setup, the service provider typically offers tools and interfaces to simplify key management. However, it is essential to understand the limitations and capabilities of these tools, especially in complex merger scenarios. Some hosted services may not support certain advanced features, such as custom key sizes or specific algorithm types, which could necessitate a hybrid approach combining managed and self-managed components.

Another critical aspect of assessing the current state is identifying potential security risks associated with DKIM keys. This includes checking for weak keys (e.g., keys smaller than 1024 bits), outdated algorithms (e.g., SHA-1), and keys that are nearing expiry. In our experience, a significant number of organisations overlook these aspects, which can lead to security vulnerabilities. For example, using a weak key can make it easier for attackers to forge emails, potentially leading to phishing attacks or spam.

To mitigate these risks, organisations should prioritise key rotation and expiry management. This involves replacing weak keys with stronger ones, updating algorithms to more secure versions (e.g., SHA-256), and ensuring that keys are rotated regularly to minimise the impact of a potential key compromise. A best practice is to use a key size of at least 2048 bits and to rotate keys every 6-12 months, depending on the organisation's security posture.

In the centre of any DKIM key management strategy is the need for a comprehensive inventory that outlines all keys, their usage, and their security status. This inventory serves as the foundation for making informed decisions about key management, rotation, and expiry, ultimately ensuring the security and authenticity of emails sent by the organisation. By taking a pragmatic approach to assessing the current state of DKIM key usage, organisations can navigate the complexities of mergers and acquisitions with confidence, setting the stage for a well-organised and secure email infrastructure.

Key Management Strategies for Merged Organisations

When organisations merge, their email infrastructures often become complex, with multiple domains, mail servers, and DKIM keys to manage. A key consideration is how to centre the management of these DKIM keys to optimise email deliverability and prevent authentication issues. One approach is to use a single, umbrella organisation-wide DKIM key, which can simplify management but may not be suitable for all merged organisations, particularly those with distinct brands or colour schemes that need to be maintained.

For example, consider a merger between two companies, example.com and mergedcompany.co.uk. If they decide to use a single DKIM key, they may choose to use a key with a selector like merged2022, as shown in the following TXT record snippet:

merged2022._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy8Dbv8prpJ/0kKhlGeJYozo2t60EG8L0561g13R29LvMR5hyvGZlGJpmn65+A4xHXInJYiPuKzrKfDNSH6hax9w9m2Vy+J8IQVE6YQW9Zr4/sBzWk5rV6RLM0s6m6JQYkg40hJ5vwQ9XZT1a9rNAPQJAZUUPWh2rM76V4cOG0" ; 

However, this approach may not be ideal if the merged companies need to maintain separate branding or if they have different email streams that require distinct authentication. In such cases, using separate DKIM keys for each domain or brand may be more suitable.

Another strategy is to use a hierarchical DKIM key structure, where each domain or subdomain has its own DKIM key, but these keys are managed centrally. This approach allows for more flexibility and can help to maintain the distinct identities of the merged companies. For instance, example.com and mergedcompany.co.uk could use separate DKIM keys, such as example2022 and merged2022, respectively:

example2022._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy8Dbv8prpJ/0kKhlGeJYozo2t60EG8L0561g13R29LvMR5hyvGZlGJpmn65+A4xHXInJYiPuKzrKfDNSH6hax9w9m2Vy+J8IQVE6YQW9Zr4/sBzWk5rV6RLM0s6m6JQYkg40hJ5vwQ9XZT1a9rNAPQJAZUUPWh2rM76V4cOG0"
merged2022._domainkey.mergedcompany.co.uk. IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnA6fHxWb6z9T4YbQ7X5jVMMBtP9mHJUxVn7QHm+ZkHJ9nQ9r6r6p6r6p6r6p6r6p6r6p6r6p6r6p6r6p6rFQIDAQAB"

In a hosted or managed setup, such as the one provided by DMARC Engine, the management of DKIM keys can be simplified through the use of a centralised dashboard, where administrators can easily add, remove, or rotate DKIM keys for multiple domains. This can help to reduce the complexity associated with managing multiple DKIM keys and ensure that all keys are properly configured and up to date.

When choosing a key management strategy, organisations should consider factors such as the number of domains and mail servers involved, the level of autonomy required for each domain or brand, and the resources available for managing DKIM keys. It is also essential to consider the impact of key rotation and expiry on email deliverability and to develop a plan for handling these events. By carefully evaluating these factors and selecting the most suitable key management strategy, merged organisations can ensure that their email infrastructures are secure, authentic, and optimised for deliverability.

In addition to the technical considerations, organisations should also consider the organisational and process-related aspects of DKIM key management. This includes defining clear roles and responsibilities for key management, establishing procedures for key rotation and expiry, and ensuring that all relevant teams are aware of the importance of DKIM key management for email deliverability. By taking a holistic approach to DKIM key management, merged organisations can minimise the risks associated with email authentication and ensure that their email communications are reliable and trustworthy.

Ultimately, the choice of key management strategy will depend on the specific needs and circumstances of the merged organisation. By weighing the pros and cons of each approach and considering factors such as complexity, flexibility, and resource requirements, organisations can select the most suitable strategy for their email infrastructure and ensure that their DKIM keys are properly managed and optimised for deliverability.

DKIM Key Rotation and Expiry: Best Practices for Complex Infrastructures

When managing DKIM keys in complex infrastructures, particularly those resulting from mergers and acquisitions, key rotation and expiry become critical considerations to ensure the security and authenticity of emails. The process involves generating new keys, deploying them across the organisation's email infrastructure, and retiring old keys to prevent potential security breaches. In our experience at DMARC Engine, where we manage DKIM, SPF, DMARC, MTA-STS, and BIMI for our customers, we've observed that the frequency of key rotation and the management of key expiry are often overlooked aspects of DKIM implementation.

A common mistake organisations make is underestimating the complexity of managing multiple DKIM keys across different domains and mail servers. For instance, consider a scenario where an organisation, let's call it Example Ltd, acquires another company, NewCo. Both companies have their own email infrastructures, with Example Ltd using selector1._domainkey.example.com and NewCo using selector2._domainkey.newco.com. When integrating these infrastructures, it's crucial to manage the DKIM keys effectively to avoid any disruption in email delivery.

To illustrate the importance of proper key management, let's examine a real-world example. Suppose Example Ltd decides to rotate its DKIM key. The new public key would be published in a TXT record, like so:

selector1._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB"

In this example, the selector1 is used to differentiate between multiple keys for the same domain, allowing for smoother key rotation without disrupting email services.

Best practices for DKIM key rotation in complex infrastructures include:
- Regular Rotation: Rotate DKIM keys periodically, ideally every 6-12 months, to minimise the impact of a key compromise.
- Key Sizes: Use sufficiently large key sizes. While 1024-bit keys were once considered secure, it's now recommended to use at least 2048-bit keys for better security.
- Selector Management: Implement a systematic approach to selector management. This could involve using a combination of the domain name and a version number or date to keep track of different keys.
- Automated Deployment: Automate the deployment of new keys across the email infrastructure to reduce the risk of human error.
- Monitoring: Continuously monitor aggregate reports for any issues related to DKIM verification failures, which could indicate problems with key rotation or deployment.

In a hosted or managed setup, such as the one provided by DMARC Engine, the process of key rotation and expiry is significantly streamlined. For example, our platform allows for the easy management of multiple DKIM keys across different domains, automated key rotation based on custom schedules, and real-time monitoring of DKIM verification failures. This not only simplifies the process for organisations with complex infrastructures but also ensures that DKIM keys are always up to date and secure.

However, even with automated tools, organisations must be aware of the potential trade-offs. For instance, rotating keys too frequently can lead to increased administrative burdens and potential errors, while rotating them too infrequently may expose the organisation to security risks. Also, the management of expired keys is crucial to prevent mail rejection by recipient mail servers. A balance must be struck between security and operational efficiency.

To optimise DKIM key management in complex infrastructures, organisations should also consider centralising their key management processes. This involves creating a single, authoritative source for all DKIM key information, which can then be used to update keys across the infrastructure. By doing so, organisations can reduce the complexity associated with managing multiple keys and selectors, making it easier to rotate and expire keys as needed.

In addition to centralising key management, organisations should implement robust testing procedures before deploying new DKIM keys. This includes verifying that the new key is correctly published in the DNS, that mail servers are configured to use the new key, and that recipient mail servers can successfully verify emails signed with the new key. At DMARC Engine, we recommend a staged rollout of new keys, starting with a small subset of mail servers or domains, to quickly identify and rectify any issues before they affect the entire organisation.

In conclusion to this section, effective DKIM key rotation and expiry are vital for maintaining the security and deliverability of emails in complex infrastructures. By following best practices, leveraging hosted or managed solutions where appropriate, and being mindful of the trade-offs involved, organisations can optimise their DKIM key management to ensure seamless email delivery while protecting against potential security threats.

Integrating DKIM with Existing SPF and DMARC Records: A Step-by-Step Guide

When organisations undergo mergers and acquisitions, integrating DKIM with existing SPF and DMARC records can be a complex task, requiring careful planning and execution to avoid disrupting email services. A key consideration is the colour of the organisation's email infrastructure, which can be a mix of on-premise and cloud-based services, each with their own set of configurations and requirements. To centre the integration process, it is essential to follow a step-by-step approach, taking into account the specific needs and constraints of the organisation.

The first step is to assess the current state of SPF and DMARC records, which can be done by querying the DNS for the organisation's domain. For example, to check the SPF record for the domain example.com, you can use the following command:

dig +short txt example.com

This will return the SPF record, which may look like this:

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

Similarly, to check the DMARC record, you can use the following command:

dig +short txt _dmarc.example.com

This will return the DMARC record, which may look like this:

"v=DMARC1; p=reject; pct=100; rua=mailto:aggrep@example.com; ruf=mailto:forensicp@example.com; fo=1"

Once you have assessed the current state of SPF and DMARC records, you can begin the process of integrating DKIM. The first step is to generate a DKIM key pair, which consists of a private key and a public key. The private key is used to sign outgoing emails, while the public key is used to verify the signature. A hosted or managed setup, such as the one provided by DMARC Engine, can handle the key generation process, providing a secure and convenient way to manage DKIM keys.

The next step is to configure the email server to use the DKIM private key to sign outgoing emails. This typically involves adding a DKIM signature to the email header, which includes the selector, the domain, and the signature itself. For example, the following email header shows a DKIM signature:

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=selector1;
 h=from:to:subject:date:message-id;
 bh=...;
 b=...

The selector is used to identify the DKIM key pair, and is typically a string of characters that is unique to the organisation. The domain is the organisation's domain, and the signature is the encrypted hash of the email header and body.

To publish the DKIM public key, you need to add a TXT record to the DNS, which includes the selector, the domain, and the public key itself. For example:

selector1._domainkey.example.com. IN TXT "k=rsa; p=..."

The k parameter specifies the type of key, which in this case is an RSA key, and the p parameter specifies the public key itself.

When integrating DKIM with existing SPF and DMARC records, it is essential to consider the trade-offs between security and deliverability. For example, if the organisation has a strict DMARC policy, such as p=reject, it may be necessary to adjust the DKIM configuration to ensure that emails are not rejected due to a failed DKIM signature. A hosted or managed setup can provide guidance on how to optimise the DKIM configuration to achieve the best possible deliverability while maintaining security.

Another consideration is the impact of DKIM on email routing and delivery. For example, if the organisation uses a third-party email service provider, it may be necessary to configure the provider to use the DKIM signature. This can be done by adding a DKIM signature to the email header, or by using a custom email routing configuration.

In terms of operational considerations, it is essential to monitor the DKIM signature and adjust the configuration as needed. This can be done by analysing the aggregate reports, which provide information on the DKIM signature and its impact on email deliverability. A hosted or managed setup can provide real-time monitoring and alerts, enabling the organisation to quickly identify and resolve any issues related to DKIM.

To illustrate the integration process, let's consider a real-world example. Suppose we have an organisation with the domain example.com, which has an existing SPF record and DMARC record. The organisation wants to integrate DKIM with its existing email infrastructure, which includes a third-party email service provider. The first step is to generate a DKIM key pair, which is done using a hosted or managed setup. The next step is to configure the email server to use the DKIM private key to sign outgoing emails, and to publish the DKIM public key in the DNS.

The resulting DKIM configuration might look like this:

selector1._domainkey.example.com. IN TXT "k=rsa; p=..."

The email header might include a DKIM signature like this:

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=selector1;
 h=from:to:subject:date:message-id;
 bh=...;
 b=...

By following these steps and considering the trade-offs between security and deliverability, organisations can successfully integrate DKIM with their existing SPF and DMARC records, improving the security and authenticity of their email communications.

Operational Considerations: DKIM Key Management in Aggregate Reports

When managing DKIM keys for organisations that have undergone mergers and acquisitions, one of the most critical aspects to consider is the impact on aggregate reports. These reports, typically received via the Aggregate Feedback (RUA) mechanism, provide valuable insights into the authentication results of emails sent by your organisation. Effective DKIM key management is crucial to ensure that these reports accurately reflect the authentication status of your emails, and that you can optimise your email infrastructure accordingly.

In a hosted or managed setup, such as the one provided by DMARC Engine, the complexity of managing DKIM keys across multiple domains and email streams is significantly reduced. For instance, our platform automates the process of generating and rotating DKIM keys, ensuring that they are properly aligned with the organisation's SPF and DMARC records. However, even with a managed setup, it is essential to understand the operational considerations involved in DKIM key management, particularly when it comes to aggregate reports.

One of the primary challenges in managing DKIM keys for merged organisations is dealing with the sheer volume of keys that need to be generated, rotated, and monitored. In a typical scenario, each domain or subdomain requires its own set of DKIM keys, which can quickly become cumbersome to manage. For example, consider a company that has acquired several smaller organisations, each with its own domain and email infrastructure. In this case, the parent company may need to manage dozens or even hundreds of DKIM keys, each with its own set of selectors and public keys.

To illustrate this point, let's consider a real-world example. Suppose we have a company called example.com that has acquired two smaller organisations, sub1.example.com and sub2.example.com. Each of these domains requires its own set of DKIM keys, which might look like this:

# DKIM key for example.com
selector:_domainkey.example.com
public-key: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0
FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB

# DKIM key for sub1.example.com
selector:_domainkey.sub1.example.com
public-key: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCpMjO9d7zQhP6x9hN0YU2D6Wp5UQ4Q7Y
cK5aOSK7O6Wqr4xKfNcMzEC1gQ9LZ4rR7zK5WjY8WjY8WjY8WjY8WjY8WqU4Q7YcK5aOSK7O6Wqr4xKfN

# DKIM key for sub2.example.com
selector:_domainkey.sub2.example.com
public-key: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3f9u5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5h
Q5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5hQ5h

As you can see, managing these keys can quickly become complex, especially when it comes to rotating them and ensuring that they are properly aligned with the organisation's SPF and DMARC records.

To optimise DKIM key management in aggregate reports, it is essential to implement a centralised key management system that can handle the complexity of multiple domains and email streams. This system should be able to generate, rotate, and monitor DKIM keys, as well as provide real-time insights into the authentication status of emails sent by the organisation.

In our experience, one of the most effective ways to manage DKIM keys is to use a automated key rotation system, which can generate new keys on a regular basis and update the corresponding DNS records. This approach ensures that DKIM keys are always up-to-date and aligned with the organisation's SPF and DMARC records, which is critical for maintaining optimal email deliverability.

For example, consider the following DNS record snippet, which shows a DKIM key that has been rotated using an automated system:

# DKIM key for example.com (rotated)
selector:_domainkey.example.com
public-key: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8xckCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4e
CZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB

As you can see, the public key has been updated to reflect the new rotated key, which ensures that emails sent by the organisation will continue to authenticate correctly.

In addition to implementing a centralised key management system, it is also essential to monitor aggregate reports closely to ensure that DKIM keys are functioning correctly. This involves analysing the reports to identify any issues with key alignment, rotation, or authentication, and taking corrective action to resolve these issues.

For instance, consider the following aggregate report snippet, which shows a DKIM authentication failure:

# Aggregate report for example.com
domain: example.com
selector: _domainkey
disposition: fail
reason: key-mismatch

In this case, the report indicates that there is a key mismatch issue, which suggests that the DKIM key is not properly aligned with the organisation's SPF and DMARC records. To resolve this issue, it would be necessary to update the DKIM key and ensure that it is properly configured to authenticate emails sent by the organisation.

In conclusion to this section, effective DKIM key management is critical for organisations that have undergone mergers and acquisitions. By implementing a centralised key management system and monitoring aggregate reports closely, organisations can ensure that their DKIM keys are properly aligned

Case Study: DKIM Key Integration for a Large-Scale Merger

When organisations undergo mergers and acquisitions, the centre of attention often revolves around financials, staff integration, and brand consolidation. However, from a technical standpoint, particularly in email deliverability, the integration of DKIM keys is a critical aspect that requires meticulous planning and execution. A recent case study involving the merger of two large e-commerce companies, ShopSmart and BuyOnline, highlights the complexities and trade-offs involved in DKIM key integration.

The merger resulted in a combined infrastructure that included multiple email service providers (ESPs), custom-built email applications, and a myriad of domains. ShopSmart had a well-established DKIM setup with a 2048-bit key, while BuyOnline used a 1024-bit key. The initial challenge was to decide whether to use a single, unified DKIM key for all merged domains or to maintain separate keys for each domain.

From an operational standpoint, using a single key simplifies management but increases the risk of key compromise. On the other hand, maintaining separate keys for each domain optimises security but complicates key management. The decision was made to use separate keys for each domain to ensure the highest level of security and flexibility. This approach allowed for easier rotation and expiry management, as well as better isolation of potential security breaches.

To implement this strategy, the first step was to conduct a thorough inventory of all domains and their respective DKIM keys. This involved reviewing DNS records for each domain, identifying the selector, key size, and public key value. For example, the DNS record for ShopSmart's domain shopsmart.com looked like this:

; DKIM key record for shopsmart.com
shopsmart._domainkey.shopsmart.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+M4k6w6n5xfM8p3xNHWxk8n4pL4/0k1B2dorRZ9R4G6hZ1zjX8twNjxOxkT8T0QkQjHc+d6kDZxZ0H6s2Z0H5QIDAQAB" ; ----- 

Similarly, BuyOnline's domain buyonline.net had its own DKIM key record:

; DKIM key record for buyonline.net
buyonline._domainkey.buyonline.net. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3gRzarwC8sYzY9N6T8x1xJjxOxkT8T0QkQjHc+d6kDZxZ0H6s2Z0H5QIDAQAB" ; ----- 

Given the decision to maintain separate keys, the next challenge was to manage key rotation and expiry. Best practices recommend rotating DKIM keys every 6-12 months to minimise the impact of a potential key compromise. However, with multiple domains and keys, this process can become cumbersome. To streamline key rotation, a centralised key management system was implemented. This system allowed for automated key rotation, notification of upcoming key expiries, and a unified view of all DKIM keys across the organisation.

In a hosted or managed setup, such as the one provided by DMARC Engine, key rotation and expiry management can be significantly simplified. These services often include automated key rotation, expiry alerts, and a user-friendly interface to manage all DKIM keys. For organisations undergoing mergers and acquisitions, leveraging such services can reduce the complexity associated with DKIM key management.

Another critical aspect of the integration was ensuring that the DKIM keys were properly aligned with the existing SPF and DMARC records. This involved reviewing the SPF records to ensure that all sending IPs were included and that the DMARC policy was set to monitor or enforce, depending on the organisation's email authentication strategy. For instance, ShopSmart's SPF record looked like this:

; SPF record for shopsmart.com
shopsmart.com. IN TXT "v=spf1 ip4:192.0.2.1 ip4:192.0.2.2 include:_spf.example.com -all" 

And BuyOnline's DMARC record was set to:

; DMARC record for buyonline.net
_buyonline._domainkey.buyonline.net. IN TXT "v=DMARC1; p=none; pct=100; rua=mailto:rua@example.com; ruf=mailto:ruf@example.com; fo=1" 

Integrating DKIM with these existing records required careful planning to avoid any disruptions to email deliverability. The organisation decided to phase the integration, starting with a subset of domains and gradually rolling out the changes to all domains. This approach allowed for real-time monitoring of email deliverability and quick mitigation of any issues that arose.

In terms of operational considerations, the integration of DKIM keys into aggregate reports (RUA) was crucial for ongoing monitoring and analysis. The RUA reports provided insights into DKIM authentication results, helping the organisation identify potential issues with key configuration or email sending practices. For example, an excerpt from an RUA report might look like this:

<?xml version="1.0" encoding="UTF-8" ?>
<feedback>
 <version>1</version>
 <record>
 <row>
 <source_ip>192.0.2.1</source_ip>
 <count>10</count>
 <policy_evaluated>
 <disposition>none</disposition>
 <dkim>fail</dkim>
 <spf>pass</spf>
 </policy_evaluated>
 </row>
 </record>
</feedback>

This report indicated a DKIM failure for emails sent from the IP address 192.0.2.1, prompting further investigation into the DKIM key configuration for the associated domain.

The case study of ShopSmart and BuyOnline's merger highlights the complexities of DKIM key integration in the context of mergers and acquisitions. It underscores the importance of meticulous planning, careful consideration of security versus management complexity, and the benefits of leveraging hosted or managed services for DKIM key management. By adopting a strategic approach to DKIM key integration, organisations can ensure seamless email deliverability and maintain the trust of their recipients in a post-merger landscape.

Trade-Offs and Challenges: Selecting the Optimal DKIM Key Management Approach

When managing DKIM keys for organisations that have undergone mergers and acquisitions, the approach to key management is crucial for maintaining email deliverability and security. A key consideration is the trade-off between key complexity and manageability. On one hand, using a single DKIM key across all domains and mail streams can simplify management, as shown in this example record:

default._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+ypQiL3dXcl1HwzX9jK9RlW4rPcR9vDx9ZJzRERQ8xU4pVQIcJ9wQ5UXzKfQ5Qk9Q9zJzRERQ8xU4pVQIcJ9wQ5UXzKfQ5Qk9Q9zJzRERQ8xU4"

However, this approach can lead to a single point of failure, where a compromise of the key can affect all mail streams. In contrast, using multiple keys can provide better security, but at the cost of increased management complexity.

Another challenge is key rotation and expiry. While it is recommended to rotate DKIM keys regularly, this can be a complex process, especially in merged organisations with multiple domains and mail streams. For example, rotating a key may require updating multiple DNS records, as well as coordinating with multiple mail streams and domains. A hosted or managed DKIM setup can help alleviate this burden, as the provider can handle key rotation and expiry on behalf of the organisation.

In addition to key rotation, organisations must also consider the impact of DKIM key management on their aggregate reports. For instance, if an organisation is using a single DKIM key across multiple domains, it may be difficult to determine which domain is responsible for a particular authentication failure. To mitigate this, organisations can use a separate DKIM key for each domain, as shown in this example record:

example1._domainkey.example1.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+ypQiL3dXcl1HwzX9jK9RlW4rPcR9vDx9ZJzRERQ8xU4pVQIcJ9wQ5UXzKfQ5Qk9Q9zJzRERQ8xU4pVQIcJ9wQ5UXzKfQ5Qk9Q9zJzRERQ8xU4"
example2._domainkey.example2.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+ypQiL3dXcl1HwzX9jK9RlW4rPcR9vDx9ZJzRERQ8xU4pVQIcJ9wQ5UXzKfQ5Qk9Q9zJzRERQ8xU4pVQIcJ9wQ5UXzKfQ5Qk9Q9zJzRERQ8xU4"

This approach can provide better visibility into authentication failures and help organisations to optimise their DKIM key management.

Organisations must also consider the colour of their DKIM key management approach, with some opting for a more centralised approach, while others prefer a decentralised approach. A centralised approach can provide better control and management, but may require significant upfront investment in infrastructure and personnel. In contrast, a decentralised approach can provide more flexibility, but may lead to inconsistent key management practices across different domains and mail streams.

To illustrate the challenges of DKIM key management, consider the example of a large organisation that has undergone multiple mergers and acquisitions. This organisation may have multiple domains and mail streams, each with its own DKIM key management approach. To simplify management, the organisation may decide to consolidate its DKIM keys into a single, centralised system. However, this approach may require significant changes to the organisation's existing infrastructure and processes, including updates to DNS records, mail streams, and aggregate reports.

In terms of specific recommendations, organisations should aim to use a minimum of 2048-bit keys, as shown in this example record:

default._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+ypQiL3dXcl1HwzX9jK9RlW4rPcR9vDx9ZJzRERQ8xU4pVQIcJ9wQ5UXzKfQ5Qk9Q9zJzRERQ8xU4pVQIcJ9wQ5UXzKfQ5Qk9Q9zJzRERQ8xU4"

Organisations should also consider using a key management system that can automate key rotation and expiry, as well as provide visibility into authentication failures. A hosted or managed DKIM setup can provide these benefits, as well as help organisations to optimise their DKIM key management approach.

Ultimately, the optimal DKIM key management approach will depend on the specific needs and requirements of the organisation. By considering the trade-offs and challenges of different approaches, organisations can select a DKIM key management strategy that balances security, manageability, and complexity. This may involve using a combination of centralised and decentralised approaches, as well as leveraging hosted or managed DKIM setups to simplify management and optimise key rotation and expiry. By taking a pragmatic and flexible approach to DKIM key management, organisations can help to ensure the deliverability and security of their email communications.

In the centre of any DKIM key management approach is the need to balance competing priorities, such as security, manageability, and complexity. To achieve this balance, organisations should consider implementing a DKIM key management system that can automate key rotation and expiry, as well as provide visibility into authentication failures. This can help to optimise DKIM key management and ensure the deliverability and security of email communications.

To optimise their DKIM key management approach, organisations should also consider the organisational implications of their chosen strategy. This may involve training personnel on DKIM key management best practices, as well as establishing clear policies and procedures for key rotation and expiry. By taking a holistic and organisation-wide approach to DKIM key management, organisations can help to ensure the long-term security and deliverability of their email communications.

In addition to these considerations, organisations should also be aware of the potential pitfalls and challenges of DKIM key management. For example, using a single DKIM key across multiple domains and mail streams can lead to a single point of failure, where a compromise of the key can affect all mail streams. To mitigate this risk, organisations can use a separate DKIM key for each domain, as shown in this example record:

example1._domainkey.example1.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+ypQi

## Implementing a Centralised DKIM Key Management System: Technical and Organisational Considerations
When organisations undergo mergers and acquisitions, managing DKIM keys becomes a complex task, particularly if each entity has its own email infrastructure. A centralised DKIM key management system can help optimise the process, reduce errors, and improve email deliverability. However, implementing such a system requires careful consideration of technical and organisational factors.

From a technical standpoint, one of the primary considerations is key storage and security. DKIM keys should be stored in a secure location, such as a Hardware Security Module (HSM) or a secure key management service. For example, Amazon Web Services (AWS) provides a Key Management Service (KMS) that can be used to securely store and manage DKIM keys. 

markdown

Example of an AWS KMS key policy

{
"Version" : "2012-10-17",
"Statement" : [ {
"Sid" : "Enable IAM policies to access the key",
"Effect" : "Allow",
"Principal" : {
"AWS" : "arn:aws:iam::123456789012:root"
},
"Action" : "kms:*",
"Resource" : "*"
} ]
}

In a hosted or managed setup, the provider typically handles key storage and security, freeing up the organisation to focus on other aspects of DKIM key management.

Another crucial aspect is key rotation and expiry. Regularly rotating DKIM keys helps prevent unauthorized use and reduces the impact of a key compromise. The frequency of key rotation depends on the organisation's security requirements and email volume. As a general rule, it is recommended to rotate DKIM keys every 6-12 months. 

python

Example of a Python script to rotate DKIM keys

import datetime
import hashlib

def rotate_dkim_key(domain, selector, private_key):

Generate a new private key

new_private_key = hashlib.sha256(str(datetime.datetime.now()).encode()).hexdigest()

Update the DKIM key record

dkim_record = f"{selector]._domainkey.{domain}. IN TXT \"v=DKIM1; k=rsa; p={new_private_key}\""

return dkim_record

In addition to key rotation, organisations should also consider key expiry. DKIM keys should be set to expire after a certain period, typically 2-5 years, to ensure that old keys are eventually removed from the system.

Organisational considerations also play a significant role in implementing a centralised DKIM key management system. One of the main challenges is coordinating across different teams and departments. Email infrastructure, security, and IT teams must work together to ensure that DKIM keys are properly managed and aligned with the organisation's overall security strategy. This can be achieved through regular meetings, clear communication, and well-defined processes.

To facilitate coordination, organisations can establish a centralised DKIM key management team responsible for overseeing key creation, rotation, and expiry. This team should include representatives from relevant departments and have a clear understanding of the organisation's email infrastructure and security requirements.

In terms of technical implementation, organisations can use various tools and services to manage DKIM keys. For example, a DKIM key management platform can provide a centralised interface for creating, rotating, and expiring keys. These platforms often integrate with existing email infrastructure and provide features such as automated key rotation, expiry reminders, and key storage.

bash

Example of a DKIM key management platform command

dkim-manager create-key --domain example.com --selector mail --private-key /path/to/private/key

When selecting a DKIM key management platform, organisations should consider factors such as scalability, security, and ease of use. The platform should be able to handle a large volume of email and provide robust security features to protect DKIM keys.

In a hosted or managed setup, the provider typically offers a range of tools and services to manage DKIM keys. For example, DMARC Engine provides a centralised DKIM key management interface that allows organisations to create, rotate, and expire keys, as well as integrate with existing SPF and DMARC records.

To optimise the centralised DKIM key management system, organisations should monitor email deliverability and DKIM key performance regularly. This can be done using aggregate reports, such as those provided by DMARC Engine, which offer insights into email deliverability, DKIM key usage, and potential security issues.

json

Example of a DMARC Engine aggregate report

{
"report_metadata": {
"org_name": "example.com",
"email": "admin@example.com",
"date_range": {
"start": "2022-01-01",
"end": "2022-01-31"
}
},
"record": {
"row": [
{
"source_ip": "192.0.2.1",
"count": 100,
"dkim": "pass"
},
{
"source_ip": "192.0.2.2",
"count": 50,
"dkim": "fail"
}
]
}
}
```
By analysing these reports, organisations can identify potential issues with their DKIM key management system and make adjustments to improve email deliverability and security.

To sum up, implementing a centralised DKIM key management system requires careful consideration of technical and organisational factors. By storing DKIM keys securely, rotating and expiring keys regularly, and coordinating across different teams and departments, organisations can optimise their DKIM key management system and improve email deliverability. Regular monitoring and analysis of aggregate reports can help identify potential issues and improve the overall security and effectiveness of the system.

Share

See where your domain stands today

Run a free DMARC scan, then let us take you to enforced p=reject with no email outage.