Php in custom dns_txt.conf

BigPhil

Verified User
Joined
May 9, 2005
Messages
9
Hi, I'm hosting the emails on an external server but the dns with directadmin. I'm trying to have a dkim record created automatically and have customised the dns_txt.conf file.

What i'm trying to achieve is
Code:
 20130729._domainkey txt "v=DKIM1; g=*; k=rsa; p=MI..."

What I have tried in the dns_txt.conf is

Code:
|$/usr/local/bin/php
<?php echo date(Ymd)?>
DONE|._domainkey="v=DKIM1; g=*; k=rsa; p=MI..."

The date doesn't appear in the record. My question is, can php be used in this way in the custom template or am I thinking like a noob?
 
Although I don't understand how you will make it work with exim which won't be able to use your selector, you could try this

Code:
|$/usr/local/bin/php
<?php
$mytime = date(Ymd);
echo $mytime._domainkey="v=DKIM1; g=*; k=rsa; p=MI..."
?>
DONE|
 
Back
Top