• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Question Server DNS template add from cli

OlgerdasB

New Pleskian
Hello,
I try to add default DNS template to plesk from CLI and has some issue with dmarc entry:

Code:
/usr/local/psa/bin/server_dns --set 'NS,,ns1.mydom.lt.;NS,,ns2.mydom.lt.;NS,,ns3.mydom.lt.;NS,,ns4.mydom.lt.;A,,<ip>;A,*,<ip>;A,mail,<ip>;MX,,mail.<domain>.,10;TXT,,v=spf1 +a +mx include:_spf.sender.mydom.lt -all;TXT,_dmarc.<domain>.,v=DMARC1; p=none;'

I ger error:
Code:
Incorrect record ' p=none'

In documentation I not found how exclude ";" symbol.
 
Last edited:
Hi OlgerdasB,

did you consider to use quotation marks?

Suggested example:
Code:
/usr/local/psa/bin/server_dns --set 'TXT,_dmarc.<domain>.,"v=DMARC1; p=none;"'
 
Hi OlgerdasB,

did you consider to use quotation marks?

Suggested example:
Code:
/usr/local/psa/bin/server_dns --set 'TXT,_dmarc.<domain>.,"v=DMARC1; p=none;"'

Hi UFHH01,
I try, result is same :/

Code:
# /usr/local/psa/bin/server_dns --set 'NS,,ns1.mydom.lt.;NS,,ns2.mydom.lt.;NS,,ns3.mydom.lt.;NS,,ns4.mydom.lt.;A,,<ip>;A,*,<ip>;A,mail,<ip>;MX,,mail.<domain>.,10;TXT,,v=spf1 +a +mx include:_spf.sender.mydom.lt -all;TXT,_dmarc.<domain>.,"v=DMARC1; p=none;"'
Incorrect record ' p=none'
 
A work around is to use --set for all except the DMARC record, and then use this:
Code:
plesk bin server_dns --add -txt "v=DMARC1; p=none;" -domain _dmarc
 
Back
Top