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

1

9

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.

Cavender answered 1/5, 2017 at 14:9 Comment(0)
C
20

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")

Cavender answered 1/5, 2017 at 16:57 Comment(2)
Thanks :) (have issue on debian) found this : support.plesk.com/hc/en-us/articles/…Foxe
ive heard that the reason is the value has a 256 character limit, so splitting it up on multiple lines seems fix that.Airfield

© 2022 - 2024 — McMap. All rights reserved.