Delighted with Mail-in-a-box

I discovered Mail-In-A-Box a few days ago, and I’m delighted.

It works as advertised out of the box, with simple installation instructions. I’ve made many attempts in the past to install my own mail server and had given up.

The standard installation is well-documented. The installation scripts in setup/ have detailed comments that explain why everything is done.

Mail-In-A-Box is an opportunity to learn many things about:

  • DNS records, SSHFP, MTA_STS, etc…
  • How email works. Mail-In-A-Box integrates all components necessary for email: nsd, postfix, dovecot, nginx with php, … Even if I want to use any single one of these components, I can learn how to set it up by reading the Mail-In-A-Box installer.
  • DNS servers. I can host my own nameserver for my domain! I thought that was hard, but Mail-In-A-Box makes it easy!
  • dovecot: finally, a dovecot installation that I can use, and learn how to store my own mail.
  • ipv6. I’ve been administering sites and personal servers for several years, but with Mail-In-A-Box, it’s the first time I started setting DNS AAAA records. I already started using ipv6 more in my other servers (ipv6 firewall, ipv6 addresses, etc.)
  • integration with Nextcloud. It’s great to find out that I can use IMAP authentication for nextcloud users.

DNS glue records, DNS

I didn’t know about NS glue records. I followed the instructions for the glue records, as in the installation video and it worked. But then I wanted to also try the external DNS that I was more familiar with, and I had trouble getting rid of the glue records. A popular registrar for my country-specific TLD does not have a way to set glue records.

Separating web-site from email

I know how to administer web sites and provision Let’s Encrypt certificates for them (I usually provision wildcard certificates for privacy and convenience). But Mail-In-A-Box wants to take over the A records for my email domains. I’ve been spending hours trying to find a solution to keep both MiaB and myself happy about who’s having control of the A records. I already posted this in more detail.

Group email Aliases

Having a group email alias that forwards incoming mail to a few other email addresses is a convenient feature that I use with non-profit organizations whose email I’ve setup with external providers. Mail-In-A-Box seems to not have this.


I’ve been setting up Nextcloud websites already, as it’s a great way to get away from Big Tech. But having a dedicated nextcloud installation in Mail-In-A-Box just for email contacts seems overkill. Roundcube seems to have its own contact management, and so does Thunderbird. Why would I want to use Nextcloud contacts instead of Roundcube contacts? Couldn’t Nextcloud be an option for those who request it? Can Mail-In-A-Box use an external nextcloud installation that I host on another server? On the other hand, I learned about Mail-In-A-Box by reading about it in the Nextcloud Contacts plugin, so integration with Nextcloud is good marketing for Mail-In-A-Box.

1 Like

You can use Roundcube to forward mail to externally managed domains. I’m not sure on the limitations for the number of email addresses one address can be forwarded to.

I just tested it out. The vanilla installation on Ubuntu 18 was flawless.
I’m tempted to try out that fork for U20/D10 next week.

They’re a terrible hack that has never gone away. Avoid if possible.

When adding an @domain.tld root address you only need your standalone [box].mailserver to have an external A record (which is absolutely “the norm”). Ignore the warnings – just be sure to add the required mail records to your DNS (preferably an external one).

Some installation flags would be amazing for those who don’t require all the addon apps.

If you’re hands-on in shell and aren’t concerned with webmail ¹, then:

  • Create a file that you’ll use for forwards /etc/postfix/forwards
  • Add forwards in the form of group@domain.tld <space> n1@d1.tld,n2@d2.tld,n3@...
  • Edit /etc/postfix/ Add virtual_alias_maps=hash:/etc/postfix/forwards to the bottom of the file
  • $ postmap /etc/postfix/forwards ¹ it will show a warning about overriding the sqlite db
  • $ service postfix restart

¹ virtual_alias_maps points to an sqlite.db by default. This overrides that.