I'm trying to enter a 4028 bit DKIM key into DNS and it seems that I'm exceeding both the UDP 512 byte limit and also the maximum record size for a TXT record.
How does someone properly create a large key (with implied larger encoded size) and import it into DNS?
Best Answer
You need to split them in the text field. I believe that 2048 is the practical limit for key sizes. Split the text field into parts 255 characters or less. There is overhead for each split.
There are two formats for long fields.
Both of which will combine as "part onepart two". More details from Zytrax.
To generate my DKIM entry I insert my public key file and wrap it in quotation marks.
My public key file contains the following:
After editing the key in my dns zone file appears as follows:
DNS returns it as follow:
DNS treats it as one long string with no extra spaces where the lines are joined. All
" "
sequences are ignored.