5.1.2 How to change IP for a mail domain, PTR and Hostname for dedicated IP

Changing the IP address for a mail domain

You can change the IP address for your email domain in your hosting control panel:

Control Panel

The specified functionality is available only for virtual hosting servers and servers with a pre-installed ISP Manager PRO/Business control panel; for Lite versions of the control panel this functionality is not available, but you can change the IP for the mail domain via SSH by running a few commands:

$ echo "domain.com.ua:91.234.38.14;" >> /etc/exim4/domainips
$ update-exim4.conf
$ /etc/init.d/exim4 restart

The specified commands will change the IP address for the mail domain domain.com.ua to 91.234.38.14 because By default, the main server IP is used if the exim4 mail server is installed.

If postfix is installed, add a similar line to /etc/postfix/domainips and reload postfix:

/etc/init.d/postfix restart

If you have previously changed the IP address for a mail domain using the above method, you must go to the domainips file and remove from there the previously added line for binding the mail domain to the additional. IP.

Also, when changing the IP address of a mail domain, you must adhere to the following recommendations for setting records of the domain:

  • mail A-record of main_ip_server
  • pop A-record of main_ip_server
  • smtp A-record of the main_ip_server
  • main.domain. MX mail
  • main.domain. MX mail
  • main.domain. TXT v=spf1 ip4:main_ip_server * ip4:additional_ip_mail_domain a mx ~all

Changing PTR for a domain

You can change PTR for a dedicated IP address yourself in the virtual hosting control panel in the List of IP addresses section by double-clicking on the IP and in its properties in the Reverse zone field specify the desired value necessarily with the exact one at the end, for example client.thehost.ua.

For virtual servers, the PTR record can be changed by logging into the control panel with your username and password, which was sent when ordering the server.

Next, in the “Virtual machines” section, you need to select the server with one click, and click the IP addresses button at the top:

Change PTR address

Then open the PTR editing form by highlighting the IP and clicking “Edit”. Or simply double-click on the desired IP from the list:

Changing PTR address 2

In the editing form, you can independently specify the desired entry for your IP address:

Changing PTR address 3

In order to change the PTR of dedicated servers, you need to contact support and ask to make changes, and you need to indicate for which IP what value should be set.

Changing the Hostname for the server

Changing Hostname is only available for VPS/dedicated servers. It can be changed in ISPManager in the Server Settings - Server Options section in the Server Name field.

Important: for stable operation of domain mail, you need to specify as PTR and Hostmane your mail domain, on which you are going to create mailboxes or any domain, is directed to the same IP. PTR and Hostmane updates occur within 6-24 hours.