DNS "TXT" record limitation

Discussion in 'ISPConfig 3 Priority Support' started by keshwarsingh, Jul 8, 2013.

Thread Status:
Not open for further replies.
  1. keshwarsingh

    keshwarsingh Member HowtoForge Supporter

    Hello,

    I currently have a pool of 42 servers joined to a multi server setup. Everything works perfectly except when i try to add a TXT record. For e.g, i want to add a TXT record for dkim.

    root@alpha:~# amavisd-new showkeys
    ; key#1, domain connect.testdomain.com, /var/dkim/master.key.pem
    dkim._domainkey.connect.testdomain.com. 3600 TXT (
    "v=DKIM1; p="
    "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArwObL2j6vB2W+BgQIqwP"
    "dh10Ftcx1b57dPzMx1r1ZefMy5LRYYodryYf6BRBmvgKGn5psnnYCTId8GPsRNMy"
    "IAMykmg/sNSMP08Uk5f1ypciDPqRNkN92Xa3iO2ET7iB/fZJlSzcBJhdpz7+aAUv"
    "MM6WanPqfffJCx488hRi7SoSxhkVB7azPTLY/r1BK/3+fUZXmn765fwvFijz3WgA"
    "0P6hY/RpTPZyl/u7p3yDIBtZot5gv0yMOq4+lI6RLwodqNWk0Nqv122WfK27cv/U"
    "bm81S4opS0xrcDW87KPwPWy1RwWR3HaeNjMTrAo8l5fRmSDf12VJ22GfQ2Quc3Vx"
    "rwIDAQAB")

    root@alpha:~#

    The interface would accept only the following for a TXT record as maximum character, maybe a limitation...

    v=DKIM1; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArwObL2j6vB2W+BgQIqwPdh10Ftcx1b57dPzMx1r1ZefMy5LRYYodryYf6BRBmvgKGn5psnnYCTId8GPsRNMyIAMykmg/sNSMP08Uk5f1ypciDPqRNkN92Xa3iO2ET7iB/fZJlSzcBJhdpz7+aAUvMM6WanPqfffJCx488hRi7SoSxhkVB7azPTLY/r1BK/3+fUZXmn76
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The max length for TXT records is 255 chars at the moment as the data column of the dns_rr table is varchar 255. If you change that to e.g. type text in mysql on master and dns slave servers, you should be able to enter up to 64k char length.
     
  3. keshwarsingh

    keshwarsingh Member HowtoForge Supporter

    Error

    SQL query:

    ALTER TABLE `dns_rr` CHANGE `data` `data` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL

    MySQL said: Documentation
    #1170 - BLOB/TEXT column 'data' used in key specification without a key length
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Then you will have to remove the index on that table.
     
  5. keshwarsingh

    keshwarsingh Member HowtoForge Supporter

    SHOW INDEX FROM dns_rr;

    dns_rr 0 PRIMARY 1 id A 21 NULL NULL BTREE
    dns_rr 0 rr 1 zone A NULL NULL NULL BTREE
    dns_rr 0 rr 2 name A NULL NULL NULL BTREE
    dns_rr 0 rr 3 type A NULL NULL NULL YES BTREE
    dns_rr 0 rr 4 data A NULL NULL NULL BTREE
    dns_rr 1 data 1 data A NULL NULL NULL BTREE
     
    Last edited: Jul 8, 2013
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Remove the ones that contain the data column:

    dns_rr 0 rr 4 data A NULL NULL NULL BTREE
    dns_rr 1 data 1 data A NULL NULL NULL BTREE
     
  7. keshwarsingh

    keshwarsingh Member HowtoForge Supporter

  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Most likely he developed the plugin for svn and not stable version and now his plugins uses internal functions that are not present in ISPConfig stable yet.
     
  9. keshwarsingh

    keshwarsingh Member HowtoForge Supporter

    Everything working fine now!

    Can we close this thread.
     
Thread Status:
Not open for further replies.

Share This Page