Setting up dkim setup dns zone syntax error on bind in ubuntu

bind, dkim, dns

Solution

Not sure on the cause, but splitting the long string up into shorter ones separated by spaces and wrapped by `(` and `)` fixes the issue. For example,

`dkim3._domainkey IN TXT ("v=DKIM1; t=s; p=" "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD78Ki2d0zmOlmjYNDC7eLG3af12KrjmPDeYRr3" "q9MGquKRkRFlY+Alq4vMxnp5pZ7lDaAXXwLYjN91YY7ARbCEpqapA9Asl854BCHMA7L+nvk9kgC0" "ovLlGvg+hhqIPqwLNI97VSRedE60eS+CwcShamHTMOXalq2pOUw7anuenQIDAQAB") `

Problem

I installed dkim. Now when I setup dns, I have a syntax error This is dns for dkim: ``` 201704._domainkey.example.com IN TXT "v=DKIM1; h=rsa-sha256; k=rsa; s=email; p=blah blah;" ``` root@example:~# named-checkzone example.com /etc/bind/db.example.com dns_rdata_fromtext: /etc/bind/db.example.com:35: syntax error zone example.com/IN: loading from master file /etc/bind/db.example.com failed: syntax error zone example.com/IN: not loaded due to errors.

Original source