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

Incorrect hostname during install when creating initial email in format of user@box.domain.com #1515

Open alento-group opened 5 years ago

alento-group commented 5 years ago

When running the install script, it used to be (if my memory serves me correctly) that when the initial email address was chosen that it would end up being user@box.domain.com. Now I see that when the initial email address is chosen it shows as entered, i.e. user@domain.com. I assume that this behaviour was modified somewhere along the way ....

Being a long time user, I create my initial account as miab@box.domain.com as I really want to keep all the MiaB maintenance stuff out of my main email account. The unintended consequence of this is that when the box later prompts for the host name is autofills box.box.domain.com. I can imagine this causing issues for the uninitiated. Perhaps a check can be added that if the initial email address has a subdomain, to use the subdomain rather than box.subdomain ...

zatricky commented 5 years ago

Sometimes the actual domain is technically a subdomain. It might be a good idea to not make new automatic assumptions.

alento-group commented 5 years ago

Exactly! Now MiaB is making that automatic assumption.... it was better the way it was before.

JoshData commented 5 years ago

Tbh I don't think it has changed in many years.

alento-group commented 5 years ago

@zatricky

Sometimes the actual domain is technically a subdomain. It might be a good idea to not make new automatic assumptions.

Ok, I just ran into a major problem with this when it comes to issuing Let's Encrypt SSL certificates when MiaB is configured only for email on a subdomain. i.e. user@box.example.com with no users for user@example.com. What happens is that the LE client looks for a zone file for example.com for a CAA record. When it does not find that zone, it causes an error.

https://community.letsencrypt.org/t/another-caa-record-failure-issue/86388 https://github.com/jrsupplee/mailinabox/issues/1