• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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