[Pdns-users] Multipart TXT records

bert hubert bert.hubert at netherlabs.nl
Mon Mar 1 15:34:18 UTC 2010


On Mon, Mar 01, 2010 at 03:29:50PM +0000, Chris Sarginson wrote:
> Hi guys,
> 
> I'm trying to use the authoratitive server with a MySQL backend to do multipart TXT records - on the advice of someone in IRC I just tried inserting multiple records, however doing this is resulting in the record being displayed as 2 seperate records:
> 
> dig @81.201.128.133 app-2._domainkey.test.sargy.co.uk TXT

Chris, try inserting the content in the database as one record, with content
between quotes.  I think it will split automatically.  If it does not, split
the data yourself.

So, to store your record, try:
update records where name='app-2._domainkey.test.sargy.co.uk' and type='txt'
set content='"t=y\; k=rsa\; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAo0DJzHgxkky69xI95gYIfbSa5gFHYCrUVbleLcbCmTqf55Flw6tQtXBM2D+k2T7MQRuAztj3cSvjXPB/nj4OWLiPFVYmvIc3cUVmuNaKo8Iiq1UY5Wp0TXnhhhMQHqeBZCrQZwoMMo4LI8ZgGnnTieUymPqlzy1I3kVEo/T0w01wC4AwQwoIPYMv3IQ5pOhhnFede"
"mP145OQVx9h+cICLfLX3kCBCrnLZKYYFsgE2xKDuNImvHjPCok0/EV1euF3ZZBj3Tl3n7f9BUhaAKFlrWdzfrizEp3doDusWZ8yRb+Bcb7ug21WRELyFR7LmXp7CGFVCEjtoXLNHQ8kQXTygQIDAQAB\;"'

You may have to remove the \ before ;.  
Also make sure your content field has enough capacity to store all this
data.

I did not test the sql above, but this is the idea.

Good luck!


> 
> app-2._domainkey.test.sargy.co.uk. 86400 IN TXT "t=y\; k=rsa\; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAo0DJzHgxkky69xI95gYIfbSa5gFHYCrUVbleLcbCmTqf55Flw6tQtXBM2D+k2T7MQRuAztj3cSvjXPB/nj4OWLiPFVYmvIc3cUVmuNaKo8Iiq1UY5Wp0TXnhhhMQHqeBZCrQZwoMMo4LI8ZgGnnTieUymPqlzy1I3kVEo/T0w01wC4AwQwoIPYMv3IQ5pOhhnFede"
> app-2._domainkey.test.sargy.co.uk. 86400 IN TXT "mP145OQVx9h+cICLfLX3kCBCrnLZKYYFsgE2xKDuNImvHjPCok0/EV1euF3ZZBj3Tl3n7f9BUhaAKFlrWdzfrizEp3doDusWZ8yRb+Bcb7ug21WRELyFR7LmXp7CGFVCEjtoXLNHQ8kQXTygQIDAQAB\;"
> 
> When selecting in MySQL:
> 
> mysql> select * from records where name="app-2._domainkey.test.sargy.co.uk"\G
> *************************** 1. row ***************************
>          id: 448463
>   domain_id: 15724
>        name: app-2._domainkey.test.sargy.co.uk
>        type: TXT
>     content: t=y; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAo0DJzHgxkky69xI95gYIfbSa5gFHYCrUVbleLcbCmTqf55Flw6tQtXBM2D+k2T7MQRuAztj3cSvjXPB/nj4OWLiPFVYmvIc3cUVmuNaKo8Iiq1UY5Wp0TXnhhhMQHqeBZCrQZwoMMo4LI8ZgGnnTieUymPqlzy1I3kVEo/T0w01wC4AwQwoIPYMv3IQ5pOhhnFede
>         ttl: 86400
>        prio: 0
> change_date: 1267456927
> *************************** 2. row ***************************
>          id: 448472
>   domain_id: 15724
>        name: app-2._domainkey.test.sargy.co.uk
>        type: TXT
>     content: mP145OQVx9h+cICLfLX3kCBCrnLZKYYFsgE2xKDuNImvHjPCok0/EV1euF3ZZBj3Tl3n7f9BUhaAKFlrWdzfrizEp3doDusWZ8yRb+Bcb7ug21WRELyFR7LmXp7CGFVCEjtoXLNHQ8kQXTygQIDAQAB;
>         ttl: 86400
>        prio: 0
> change_date: 1267456927
> 2 rows in set (0.00 sec)
> 
> Can someone please point me in the right direction?
> 
> pdns_server --version
> Version: 2.9.23-pre, compiled on Jan 19 2010, 10:47:55 with gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)
> 
> Chris
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users
> 



More information about the Pdns-users mailing list