• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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