Content for TXT record is invalid. (Code: 9007)

Hi,
Just installed a new mail server and created DKIM record there. When I’m adding the DKIM record in Clouflare, it is giving me Content for TXT record is invalid. (Code: 9007) error.

Can anyone please suggest what I am doing wrong here? I had similar server before and that record went well. Here is the record I am trying to use -

D658EB68-DBBA-11EE-824B-E233034CE0C9._domainkey
"v=DKIM1; k=rsa; "
          "p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyO6U9XfO7Pu/Ik9ZvKF6SNRQcuLiR8UHu6w0rGdTaBh7D4PomF7MYecpsGhmcHDIXA1P0oC4sPJkSrALNj2OVHzgkeq1MPacRpojSP4ii+dUF+fG+mgRFGvWqK6X71ZGR0epXsRdsvSd2F1cLEypj5hcldXNdLR9ZtA1bC2S2+Zc99hWsHYQxEv6V7UNlAbfh/L8Zj9TrTgBBn"
          "lzGtNgQywfvSSmMSJ+uW3831vnTWZviyfMJI8QFKlZFAOsVqTNr+b2uEjFWxf6ijoEo7gH0BZFiEimFFpoeIRUejMFThyNcOvaiQPY+RPU1PHjbHh3x3smWXalwuMaHNCpFDReAQIDAQAB"```

I don’t know where you copied the content from, but it shouldn’t have line breaks or " in it.

Try this:

v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyO6U9XfO7Pu/Ik9ZvKF6SNRQcuLiR8UHu6w0rGdTaBh7D4PomF7MYecpsGhmcHDIXA1P0oC4sPJkSrALNj2OVHzgkeq1MPacRpojSP4ii+dUF+fG+mgRFGvWqK6X71ZGR0epXsRdsvSd2F1cLEypj5hcldXNdLR9ZtA1bC2S2+Zc99hWsHYQxEv6V7UNlAbfh/L8Zj9TrTgBBnlzGtNgQywfvSSmMSJ+uW3831vnTWZviyfMJI8QFKlZFAOsVqTNr+b2uEjFWxf6ijoEo7gH0BZFiEimFFpoeIRUejMFThyNcOvaiQPY+RPU1PHjbHh3x3smWXalwuMaHNCpFDReAQIDAQAB

Thanks. I got the code from Zextras CLI. My previous server was on Zimbra and similar record worked fine in Cloudflare. Here is one example -

Did cloudflare changed their rules?

You can’t have a line break in a TXT record. And the " shouldn’t be in there.

I removed the quotation marks and line breaks in my previous response, that should work.

Thanks a lot mate. It worked now but not sure it will do the job.

Hi @online11, your topic has a solution here.

Let us know what you think of the solution by logging in and give it a :+1: or :-1:.


Solutions help the person that asked the question and anyone else that sees the answer later. Login to tell us what you think of the solution with a :+1: or :-1:.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.