Question

DKIM Record In DNS

I’ve been unable to add a DKIM using the Digital Ocean DNS control panel because it exceeds 256 characters.

v=DKIM1; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzLoiRSkXBbu83qXedscb gC7d4kevZRj7eO54SLo4hU/T2kZ1XmuJ203zsa8ejPgG6es7jiSHPOe4OGD5h5Xb 9DkRyOhkTEPe1XjUWU6kXGRy18nHG0iR0cNiNX1VPpFULHEQulkt/mFwN8MDm9Tv YryHcufZ6nM75aJu4an+x4r8lINVd+3GL4SGYhyfDdvH8d3rOefJ1TmjbCcqwkMB rXGjG4PllMhYkTylqCgjST5HQyGrWh6MbyIG0vQv5czf4SehzWeD7qP+0CYEIHW9 BFwZD4OmmZc4DljMaw4x9yIgT41b1XaKnEnw6tnyepJ6CcjR6eoHN0qEioAxFcwu HwIDAQAB

Does anyone know if there is a way of getting this to work


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello there,

What you can try is to split the record into two parts using quotes and then run another test via mail-tester.com or mxtoolbox. In this way, you can check if the record is valid and if it’s a case of DNS cache and the record not taking immediate effect.

We do have an article on How To Install and Configure DKIM with Postfix on Debian Wheezy

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-dkim-with-postfix-on-debian-wheezy

Once created you can use a DKIM checker tool like the one provided from mxtoolbox or mail-tester and check whether the generated key is valid.

https://mxtoolbox.com/dkim.aspx

https://mail-tester.com

Hope that this helps! Regards, Alex

I had the same issue following https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-dkim-with-postfix-on-debian-wheezy

There were new lines in the key, they had to be removed. Also, one of the new lines had a backslash before it which was treated as new line by digitalocean. The key was 238 characters long and fit alright, so those who have longer keys might try following instruction I followed or remove extra stuff - only the data between quotes should go into the field + new lines and extra quotes should be removed. Example

mail.txt:

mail._domainkey IN TXT "v=DKIM1; k=rsa; " “p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5N3lnvvrYgPCRSoqn+awTpE+iGYcKBPpo8HHbcFfCIIV10Hwo4PhCoGZSaKVHOjDm4yefKXhQjM7iKzEPuBatE7
O47hAx1CJpNuIdLxhILSbEmbMxJrJAG0HZVn8z6EAoOHZNaPHmK2h4UUrjOG8zA5BHfzJf7tGwI+K619fFUwIDAQAB” ; ----- DKIM key mail for example.com

TXT field should have the following:

“v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5N3lnvvrYgPCRSoqn+awTpE+iGYcKBPpo8HHbcFfCIIV10Hwo4PhCoGZSaKVHOjDm4yefKXhQjM7iKzEPuBatE7O47hAx1CJpNuIdLxhILSbEmbMxJrJAG0HZVn8z6EAoOHZNaPHmK2h4UUrjOG8zA5BHfzJf7tGwI+K619fFUwIDAQAB”

Anybody figure this out? The key that I’ve generated from Mandrill is 236 characters. I’ve pasted it in with quotes around it. Seems to not be validating though.