• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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