Hi,
I have a mail server at domain mydomain.mk and now I would like to change it to newdomain.net. How to do that?
I did this:
First I log into the web UI as admin and added mail.newdomain.net under Configuration - Domains - Add domain.
I also added DNS records for mail.newdomain.net through my internet registrar.
Then I ssh-ed into the server and did this:
cd /opt/mailcow-dockerized
docker-compose down
nano mailcow.conf
Then I changed MAILCOW_HOSTNAME=mail.mydomain.mk to MAILCOW_HOSTNAME=mail.newdomain.net.
Finally, I said docker-compose up -d.
First problem. openssl x509 -in /opt/mailcow-dockerized/data/assets/ssl/cert.pem -text still says that Subject: CN = mail.mydomain.mk and not mail.newdomain.net.
Another problem. I am using Nginx proxy, so I changed /etc/nginx/sites-enabled/default - server_name, but I left SSL directives the same:
ssl_certificate /opt/mailcow-dockerized/data/assets/ssl/cert.pem;
ssl_certificate_key /opt/mailcow-dockerized/data/assets/ssl/key.pem;
Now, when I go to the web UI (https://mail.newdomain.net), web browser warns me, that the certificate issued is not correct (which is expected since openssl told me that Subject: CN = mail.mydomain.mk.
However, how to go from one domain to another? Hopefully complete reinstall is not an option…