helpcenter/Web/Controls/Help/Server/Docker/Mail/ChangeDomainMailServer/ChangeDomainMailServer.ascx

75 lines
4.0 KiB
Plaintext
Raw Normal View History

<%@ Control Language="C#" Inherits="BaseContentUserControls"%>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Changing domain used with ONLYOFFICE Mail";
MetaKeyWords = "";
MetaDescription = "";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Changing domain used with ONLYOFFICE Mail</h1>
<cc:localizecontent runat="Server" controlname="~/Controls/Help/VariousControls/Versions/MailServer/MailServerDocker_Current.ascx" />
<div class="keyword_block">
<ul>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/local-server/local-server.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/server-version/server-version.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/mail-server-server/mail-server-server.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/docker-version/docker-version.ascx" /></li>
</ul>
</div>
<div class="video_ground video_trips">
<h2 id="introduction">Introduction</h2>
<div class="block_of_step">
<div class="screen_text">
<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>
</div>
</div>
</div>
<h2 id="step1">Step 1: Stop ONLYOFFICE Mail container and remove it</h2>
<div class="block_of_step">
<div class="screen_text">
<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>
<pre><code>docker stop onlyoffice-mail-server</code></pre>
<p>Then remove this container:</p>
<pre><code>docker rm onlyoffice-mail-server</code></pre>
</div>
</div>
<h2 id="step2">Step 2: Reinstall ONLYOFFICE Mail with new domain address</h2>
<div class="block_of_step">
<div class="screen_text">
<p>Now reinstall <b>ONLYOFFICE Mail</b> with the new domain address which will be used for <b>ONLYOFFICE Mail</b>:</p>
<pre><code>bash enterprise-install.sh -ics false -ids false -icp false -ims true -md {NEW-MX-DOMAIN} -es true</code></pre>
<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>
</div>
</div>
<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>
<p>Where <code>{NEW-MX-DOMAIN}</code> is again the new address used for <b>ONLYOFFICE Mail</b>.</p>
</div>
</div>
<h2 id="step4">Step 4: Start ONLYOFFICE Mail</h2>
<div class="block_of_step">
<div class="screen_text">
<p>Now you can start <b>ONLYOFFICE Mail</b>:</p>
<pre><code>docker logs -f onlyoffice-mail-server</code></pre>
<p>The output should look like this:</p>
<pre><code>...
Starting fail2ban: [ OK ]
Starting server</code></pre>
</div>
</div>
</div>