• 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.

How to issue CLI DNS command with wildcard

Chris1

Regular Pleskian
Hello,

I want to run a script that will loop through all of the domains on a particular server and remove all MX records with mail.*.

I am testing on a single test domain at the moment but I'm not sure how to do the wildcard.

/usr/local/psa/bin/dns -d example.com -mx '' -mailexchanger mail.*

How can I do this?

Also, in addition to this, I'd like to understand this command a little better. The following example command is from: http://download1.parallels.com/Ples...e/plesk-unix-cli/index.htm?fileName=37771.htm

To add an MX resource record mail3.example.com specifying domain name mail.example.com as the mail exchanger for the record, and setting the mail exchanger's priority to the DNS zone on the domain example.com to 15:

# ./dns -a example.com -mx mail3 -mailexchanger mail.example.com -priority 15

What does the mail3.example.com got to do with it? Isn't it just adding a MX record mail.example.com?
 
Last edited:
Back
Top