mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
13.98k stars 1.44k forks source link

Hostname change is not handled correctly #923

Open Zero3 opened 8 years ago

Zero3 commented 8 years ago

I just installed Mail-in-a-Box and entered a hostname under a domain I own. I then realized that I wanted to test the system with another domain, and thus wanted to change the hostname to fall under that domain instead.

It is noted in multiple places that you can re-run the setup to change things like this by executing sudo mailinabox. So I did, and changed the hostname to fall under the new domain. However, after visiting the admin panel once more, I see that this change has led to a fragmented system with a mixture of the old and new hostname. Some parts of the admin panel shows the old hostname, and some show the new. So it appears like the hostname change has broken stuff and left a fragmented mess.

Here is a list of the places in the admin panel where I see references to the old hostname:

JoshData commented 8 years ago

This is all mostly expected.

When you change the hostname of the box, the box doesn't delete any mail users or aliases that have been configured - including automatic ones. You still have aliases configured for the old hostname, which would be up to you to delete if you no longer need those addresses. Because those aliases exist, the box has to have everything else working for that domain name - a postmaster address, a TLS certificate, web, etc. That's why all of the old things are still there.

Overall it sounds like the box is working correctly.

I'm not sure about the TLS certificate though. The warning is probably fine but it should offer you the option of provisioning a new certificate for the new hostname.

nordurljosahvida commented 8 years ago

I just had the same issue. It won't offer you to provision a new certificate, only to install one manually. It says "Certificate has a problem: The certificate is for the wrong domain name. It is for box.old.domain". Even manually, I looked in the tls certs directory but can't point the symlink to the correct cert as the one for box.new.domain had never been provisioned before the change. Now box.new.domain has a hostname mismatch tls error. Thank you.

ajimix commented 6 years ago

I just changed the hostname and found the same issue. There is no new way to provision a new certificate for the new hostname