This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

DNS Manager TXT type 100 char size limit
#11
[Not Solved] RE: DNS Manager TXT type 100 char size limit
seems new version of opendkim uses a stronger algorithm. setting SignatureAlgorithm rsa-sha256 in
/etc/opendkim.conf makes the file shorter. still needs to be solved though...
Reply
Thanks given by:
#12
[Not Solved] RE: DNS Manager TXT type 100 char size limit
(05-15-2018, 06:56 PM)chongma Wrote: seems new version of opendkim uses a stronger algorithm.  setting SignatureAlgorithm rsa-sha256 in
/etc/opendkim.conf makes the file shorter.  still needs to be solved though...

We can fix this with a couple of steps:

First, alter the table structure for the "x_dns" table in the database so that the "dn_target_vc"  field length is a suitably high value... might be a good idea to future-proof it and assume one day we will use large strings here, so maybe a few hundred or even a few thousand characters?

Second, you need to edit two files (these paths are CentOS7-based, you might need to change for a different OS):


Code:
/etc/sentora/panel/modules/dns_manager/code/controller.ext.php
/etc/sentora/panel/modules/dns_manager/hooks/OnDaemonRun.hook.php


and replace all occurrences of:


Code:
stripslashes($rowdns['dn_target_vc'])


with:


Code:
rtrim(chunk_split(stripslashes($rowdns['dn_target_vc']), 100, '" "'),'" "')


This will chunk the one long string into several smaller strings of 100 characters. This formats the long TXT entry correctly for records longer than 255.

Try it and see. A DKIM checker like https://mxtoolbox.com/dkim.aspx should show your DKIM record is correct.

Keith.

Edit: Just to be clear, when a user enters the record they do not need to "chunk" it themselves. They can just paste in the entire record text without any new lines, quotes (which would be removed from the string anyway, along with backslashes), etc. If they later edit it, it will be presented back to them looking exactly the same. The chunking does not get stored in the database, it only affects the txt file that is generated for use by BIND.
Reply
Thanks given by: TGates


Possibly Related Threads...
Thread Author Replies Views Last Post
Cron Manager Error sathish2009 5 3,118 11-08-2016, 04:04 AM
Last Post: TGates
Type of panel login page opens the site address. yener 1 1,957 11-17-2015, 07:10 PM
Last Post: Me.B
How to increase size in attachment files? cfreire 11 13,723 07-17-2015, 03:52 AM
Last Post: cfreire

Forum Jump:


Users browsing this thread: 1 Guest(s)