On Mar 20, 2019, at 19:37, Jonathan Reed <jreed...@gmail.com> wrote:

>> TXT records are limited to strings of 255 characters or less, but can have 
>> multiple strings, They'll be concatenated in order by the DKIM validator - 
>> I'm guessing that's what you're thinking of.
> Yes, indeed.
> 
> My pub key is 400 chars long, and inserting the long string as a set into 
> records.content fails as expected.
> mysql> UPDATE records set content = '"v=DKIM1; k=rsa; p=190_char_string" 
> "200_more_chars"' where id = 1234;
> ERROR 1406 (22001): Data too long for column 'content' at row 1

There is no workaround. You’ll need to fix your database schema (that’d be 
trivial on postgresql, but I don’t know enough about mysql’s limitations to 
know whether it’ll be painful there).

> 
> Alternatively, adding a second row with the same records.name (same selector) 
> makes sense.
> mysql> UPDATE records set content = '"200_more_chars"' where id = 1235;

That won’t work, ever. It needs to be a single TXT record.

Cheers,
  Steve


> 
> However this fails also the checker, as it cannot determine that the second 
> row is a continuation of the pub key with the row proceeding it. I'm still 
> struggling with appending the pubkey to the previous record.
> 
>> On Wed, Mar 20, 2019 at 2:14 PM Steve Atkins <st...@blighty.com> wrote:
>> 
>> 
>> > On Mar 20, 2019, at 5:49 PM, Jonathan Reed <jreed...@gmail.com> wrote:
>> > 
>> > Hi,
>> > 
>> > I'm running an old version of pdns where my backend record length for 
>> > "records.name" is still varchar(255). I've read it's been extended to 64k. 
>> > However I'm trying to insert a 400 character dkim value in it by adding 
>> > multiple records for the dkim to simulate a continuation of the key 
>> > string. Short of altering the table to allow for the longer lengths, have 
>> > any of you had experience with the syntax for making long strings like 
>> > this?
>> > I've used the conventional escape char \ and tried enclosing the entire 
>> > string in a paren () but no luck. Perhaps someone else out there has had 
>> > to do this in the past?
>> 
>> records.name holds the name of the record, e.g. 
>> "whatever._domainkey.example.com", not the content, so 255 characters should 
>> be just about enough. records.content is where the content lives.
>> 
>> TXT records are limited to strings of 255 characters or less, but can have 
>> multiple strings, They'll be concatenated in order by the DKIM validator - 
>> I'm guessing that's what you're thinking of.
>> 
>> The syntax for that data in records.content is wrapping each string in the 
>> record in double quotes and separating those (two) strings with spaces - so 
>> something like '"v=DKIM1\; p=...base64 goop..." "...more base64 goop..."'
>> 
>> I'm not sure whether / why the semicolon needs to be backslash escaped. An 
>> homage to bind file format, I guess.
>> 
>> Cheers,
>>   Steve
_______________________________________________
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to