Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

bind

dns

dkim

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.

like image 864
pedro Avatar asked May 01 '17 14:05

pedro


People also ask

How do you add a DKIM bind record?

First, you must ensure that you'll be able to add the DKIM public keys. You'll need a configuration stanza like this in your BIND configuration file: zone "_domainkey.itverx.com" { type master; file "db._domainkey.itverx.com"; update-policy { grant dupdates.itverx.com. subdomain _domainkey.itverx.com.

Is Dkim a TXT record?

A DKIM record is a specialized DNS TXT record that stores the public key used to verify an email's authenticity.


1 Answers

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

like image 172
pedro Avatar answered Sep 30 '22 20:09

pedro