Is there a way to have multiple domains for the box for imap and smtp? I know we can host as many domains as we want, if we set box.mydomain.com in the settings of the email client. Now I want to have mutliple domains here too. Is that possible?
You can use a CNAME record to point mail.mydomain.com >> box.mydomain.com or mail.otherdomain.com >> box.mydomain.com BUT this will not work in the sense that it will cause SSL certificate problems in the users email client, so for all intents and purposes, the design of MiaB precludes this.
Though, someone with good scripting skills, COULD do a unsupported modification.
It is possible but you have to change the config manually a little bit. Also you have to renew the Let’s encrypt certificate manually. If you’re interested please let me know so that I can post it here.
First you have to provision the LE certificate manually. You have to temporary stop Nginx for this. sudo service nginx stop sudo letsencrypt certonly --email your@email.address -d mail.domain1.com -d mail.domain2.com -d mail.domain3.com
Then start Nginx again sudo service nginx start
Then we have to configure Dovecot to use the new certificate sudo nano /etc/dovecot/conf.d/10-ssl.conf
Change the following lines to: ssl_cert = </etc/letsencrypt/live/mail.domain1.com/fullchain.pem ssl_key = </etc/letsencrypt/live/mail.domain1.com/privkey.pem
Save the file and exit nano
Restart dovecot sudo service dovecot restart
Then we have to configure postfix to use the certificate sudo nano /etc/postfix/main.cf
Two points … the certificate should ALSO have the hostname as one of the domains it covers … and expect this to be overwritten when the version of MiaB is upgraded.