How to change SOA e-mail address for a particular domain

Created:

2016-11-16 13:24:01 UTC

Modified:

2017-08-16 16:50:16 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to change SOA e-mail address for a particular domain

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Linux
  • Plesk 11.x for Windows
  • Plesk 12.0 for Windows
  • Plesk 12.0 for Linux

Question

How to change SOA e-mail address for a domain?

Answer

E-mail address for SOA record is assigned in such a way that it uses the subscription owner's mail address in Plesk. If a domain is created under admin user, it will have admin user's mail as e-mail address in the SOA record. If a domain is created under a particular customer, the SOA record will have this customer's e-mail address.

To find the SOA e-mail address of the domain, log in to Plesk database and execute the following commands:

mysql> set @domain_name := 'example.com';
mysql> select name, email from dns_zone where name=@domain_name;

To update an e-mail:

  1. Back up current Plesk database state.

  2. Set up a new e-mail:

    mysql> set @domain_name := 'example.com';
    mysql> set @new_email := 'new@email.com';
    mysql> update dns_zone set email=@new_email where name=@domain_name;
  3. Update DNS zone:

    # /usr/local/psa/admin/bin/dnsmng --update example.com
  4. To check the e-mail use ' dig ' utility. For example:

    # dig SOA example.com @localhost | grep 'SOA'
    ....
    example.com. 3600 IN SOA ns.example.com. new.email.com. 1377304780 10800 3600 604800 10800

    The contact e-mail is the second record in SOA resource record (note that the ' . ' sign is used instead of the ' @ ' sign in the e-mail name).

    Alternatively, use ' nslookup ' utility:

    # nslookup -q=soa example.com localhost | grep mail
    mail addr = new.email.com

To assign a new e-mail address, common for all zones hosted on the server, do the following:

# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa -e "update dns_zone set email='new@email.com';"
# /usr/local/psa/admin/bin/dnsmng --update all

To assign the new e-mail address to newly created domains, create a cron task with the commands above.

Have more questions? Submit a request
Please sign in to leave a comment.