• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    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. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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