- Home
- Workspace
- Installation
- Enterprise
- Docker
- Changing domain used with ONLYOFFICE Mail
Changing domain used with ONLYOFFICE Mail
Introduction
If you decide to change the domain used with ONLYOFFICE Mail, you will need to update the information about it for your system. Follow the steps below so that this process ran without any troubles.
Step 1: Stop ONLYOFFICE Mail container and remove it
First, you will need to stop the container with ONLYOFFICE Mail. Enter the computer with ONLYOFFICE Mail installed and run the command:
docker stop onlyoffice-mail-server
Then remove this container:
docker rm onlyoffice-mail-server
Step 2: Reinstall ONLYOFFICE Mail with new domain address
Now reinstall ONLYOFFICE Mail with the new domain address, which will be used for ONLYOFFICE Mail:
bash workspace-enterprise-install.sh -ics false -ids false -icp false -ims true -md {NEW-MX-DOMAIN} -es true
Where {NEW-MX-DOMAIN}
is the new address used for ONLYOFFICE Mail (usually it has an mx.yourdomain.com or alike address).
Step 3: Update information about domain
After that, you will need to update the information in the database about the domain used. Run the following commands:
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}';"
Where {NEW-MX-DOMAIN}
is again the new address used for ONLYOFFICE Mail.
Step 4: Start ONLYOFFICE Mail
Now you can start ONLYOFFICE Mail:
docker logs -f onlyoffice-mail-server
The output should look like this:
...Starting fail2ban: [ OK ]Starting server