nethawk has asked for the wisdom of the Perl Monks concerning the following question:
If i do amy $txtdata = "v=DKIM1; k=rsa; t=y;p=MIGfMA0GCSqGSIb3DQAFGQUAA4GNADCBi +QKBgQDwWV9npEVjm10XoR1NIx174X/SR+BW8yd4RaXMk+pSDwNx0bFK8fPCXf7tLtFbjC +mYldyhsrnrcloWPVlJkAy41xaTGUcXWpC2Onr/ScbkXa9cuREv4Fy4YmMpHoBKSHoE2JI +8wBEe4oOoHPojT/b+HTNoZmxfkrYqk5eN5jnUewIDAQAB"; my $a = ";"; my $b = "\\" . ";"; # trying to escape the ; $txtdata =~ s/$a/$b/g; my $update = Net::DNS::Update->new("domain.com"); $update->push("update", rr_add("porgy._domainkey.domain.com 600 TXT '$ +txtdata'")); $update->sign_tsig("keyname", "keysign"); my $res = Net::DNS::Resolver->new; $res->nameservers("ns.domain2.com"); my $reply = $res->send($update);
I get the TXT record back, but the semicolon is more than once escaped as:host -a porgy._domainkey.domain.com ns.domain2.com
Anyone is seeing an error on my side ? Thanks"v=DKIM1\\\; k=rsa\\\; t=y\\\;p=MIGfMA0GC..."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Create a TXT record for DKIM using Net::DNS
by ww (Archbishop) on Feb 10, 2009 at 01:13 UTC | |
by almut (Canon) on Feb 10, 2009 at 02:09 UTC | |
by nethawk (Initiate) on Feb 10, 2009 at 10:51 UTC |