<p>If you decide to change the domain used with <b>ONLYOFFICE Mail</b>, you will need to update the information about it for your system. Follow the steps below so that this procees ran without any troubles.</p>
<p>First you will need to stop the container with <b>ONLYOFFICE Mail</b>. Enter the computer with <b>ONLYOFFICE Mail</b> installed and run the command:</p>
<p>Where <code>{NEW-MX-DOMAIN}</code> is the new address used for <b>ONLYOFFICE Mail</b> (usually it has an <b>mx.yourdomain.com</b> or alike address).</p>
<h2 id="step3">Step 3: Update information about domain</h2>
<div class="block_of_step">
<div class="screen_text">
<p>After that you will need to update the information in the database about the domain used. Run the following commands:</p>
<pre><code>docker exec -it onlyoffice-mysql-server mysql -pmy-secret-pw --silent -e "use onlyoffice; update mail_server_server SET mx_record = '{NEW-MX-DOMAIN}';"
docker exec -it onlyoffice-mysql-server mysql -pmy-secret-pw --silent -e "use onlyoffice; update mail_server_server ms inner join mail_mailbox_server s on ms.smtp_settings_id = s.id or ms.imap_settings_id = s.id SET s.hostname = '{NEW-MX-DOMAIN}';"</code></pre>