Can't set a DKIM record since it's too long

July 11, 2019 336 views
DigitalOcean DNS Email Ubuntu 18.04

I’m trying to set up an email server via Modoboa. It’s asking me to add my DKIM key to my DNS. Since it’s controlled via DigitalOcean, I go there to add it, but it rejects it because TXT characters can only have a max length of 512 characters.

What can I do?


1 Answer


Usually if a domain provider limits the size of the TXT record value to 255 characters, you can’t enter the DKIM key as a single entry in the DNS records. In this case, split the key into multiple quoted text strings and enter them together in the TXT record value field. For example, split the DKIM key into two parts as follows:

"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAraC3pqvqTkAfXhUn7Kn3JUNMwDkZ65ftwXH58anno/bElnTDAd/idk8kWpslrQIMsvVKAe+mvmBEnpXzJL+0LgTNVTQctUujyilWvcONRd/z37I34y6WUIbFn4ytkzkdoVmeTt32f5LxegfYP4P/w7QGN1mOcnE2Qd5SKIZv3Ia1p9d6uCaVGI8brE/7zM5c/"

Hope that this helps!

Have another answer? Share your knowledge.