Identifying DKIM key length (1024 or 2048 bits) can be achieved using several methods. The most common approach involves using OpenSSL, a command-line tool, to analyze the DKIM public key. This involves extracting the DKIM record from your DNS, saving the public key to a file, and then using OpenSSL commands (e.g., `openssl rsa -in key.pem -text -noout`) to display the key's details, including the modulus (which indicates key length). Several variations of the OpenSSL command exist. Alternatively, various online DKIM validator tools (e.g., dkimvalidator.com, MXToolbox, mail-tester.com) offer a simpler, user-friendly way to automatically check the DKIM record and display the key size. Some services like Wombatmail also provide such a function. A proper DKIM key should be at least 1024 bits.
8 marketer opinions
Identifying DKIM key length involves several methods, primarily using OpenSSL commands or online DKIM validator tools. OpenSSL requires extracting the DKIM record from the DNS, saving the public key to a file, and then using commands like `openssl rsa -in key.pem -text -noout` to view the key's details, including the modulus that indicates key length. Alternatively, online tools like dkimvalidator.com and MXToolbox can automatically check DKIM records and display the key size, offering a more user-friendly approach.
Marketer view
Email marketer from UnlockTheInbox shares that in the DNS TXT record for DKIM, the key size isn't directly visible, as the record contains the public key itself. To find the key size, you must extract the public key from the DNS record and then use a tool like OpenSSL to analyze it.
15 Jul 2021 - unlocktheinbox.com
Marketer view
Email marketer from SuperUser recommends using online DKIM validators like dkimvalidator.com to check the key size, providing a user-friendly alternative to command-line tools.
12 Sep 2021 - SuperUser
4 expert opinions
Identifying DKIM key length can be achieved through several methods. Wombatmail offers a tool for identification, while OpenSSL commands on Mac/Unix provide a command-line approach, requiring proper formatting of the key information. A Python script on GitHub is also available for this purpose. Regardless of the method, it's important to ensure the DKIM key length is 1024 bits or greater for proper security.
Expert view
Expert from Email Geeks shares that Wombatmail can be used to identify DKIM key length and provides an example link.
8 Mar 2025 - Email Geeks
Expert view
Expert from Email Geeks explains how to use the OpenSSL command on Mac/Unix to identify DKIM key length, providing the command and explaining how to format the key information.
24 Sep 2024 - Email Geeks
4 technical articles
Identifying DKIM key length is primarily achieved using OpenSSL commands. DigiCert.com explains extracting the public key and using `openssl rsa -in <keyfile> -text -noout`. Let's Encrypt Community shares using `openssl rsa -in privkey.pem -text | grep Private-Key: | cut -d' ' -f4` to get the size in bits. OpenSSL's wiki details using `openssl rsa -in your_private_key.pem -pubout -outform PEM | openssl rsa -pubin -text -noout` for detailed key information. Alternatively, knowledgeadvisor.biz suggests using online tools like mail-tester.com to check key validity and length.
Technical article
Documentation from DigiCert.com explains how to use OpenSSL to check the DKIM key length. They describe the command line steps involving extracting the public key, saving it to a file, and then using openssl rsa -in <keyfile> -text -noout to display the key details, including modulus, which indicates the key length.
6 Nov 2023 - DigiCert.com
Technical article
Documentation from Let's Encrypt Community explain how to show the size of the RSA key. Using OpenSSL, you can use this command: `openssl rsa -in privkey.pem -text | grep Private-Key: | cut -d' ' -f4`. This command will extract the key size in bits.
30 Jul 2023 - community.letsencrypt.org
Are people using 4096-bit DKIM keys, and what is the recommended DKIM key length?
Do DKIM selectors affect email reputation?
Does rotating DKIM keys improve email deliverability and how should DKIM keys be rotated?
How do I find the DKIM selector for my domain in Dmarcian or Hubspot?
How should DKIM selector names be interpreted and what is the recommended DKIM key size?