# Mail-in-a-Box

Mail-in-a-Box is an easy-to-deploy self-hosted mail server that turns a fresh Ubuntu machine into a complete email hosting solution.

Canonical page: https://ourlocalhost.com/app/7856/mail-in-a-box

## Description

Mail-in-a-Box is an easy-to-deploy self-hosted mail server that turns a fresh Ubuntu machine into a complete email hosting solution. It provides SMTP, IMAP, spam filtering, DNS, and webmail, letting individuals become their own mail service provider in a few easy steps. It suits privacy-conscious users and homelabbers who want full control over their email instead of relying on large providers.

## Platform availability

Available on 1 of 10 platforms: Any server.

## Health score

72/100 (Good), based on 5 of 5 factors.
- Maintained: 82 (last commit 25 days ago)
- Popular: 84 (15,483 GitHub stars)
- Easy to install: 25 (1 install platform, install notes)
- Light to run: 85 (512 MB minimum RAM)
- Security check: 74 (no serious findings, tests, OpenSSF Scorecard 5.7/10)

## Links

- Documentation: https://mailinabox.email/guide.html
- Official website: https://mailinabox.email/
- GitHub: https://github.com/mail-in-a-box/mailinabox

## Common questions

### Can I run Mail-in-a-Box on a server at home?

No. Most residential networks block outbound mail on port 25 and are on receiving-side blacklists, and home IPs are usually dynamic without configurable reverse DNS. You need a virtual machine in the cloud.

### Can I install Mail-in-a-Box on an existing server or customize it afterwards?

No. It must be installed on a fresh, dedicated Ubuntu 22.04 machine, and manual configuration changes will be overwritten by the box's self-management.

### How does Mail-in-a-Box handle backups?

It includes automated backups using duplicity, which can be sent to Amazon S3 and other services.

### Does Mail-in-a-Box manage DNS and TLS certificates for me?

Yes. It runs its own authoritative DNS server with SPF, DKIM, DMARC, DNSSEC, and other records set automatically, and TLS certificates are provisioned automatically via Let's Encrypt.

### I'm upgrading from version 5x or earlier — is there anything special I need to do?

Yes, you have to move to Ubuntu 22.04 and should read the release announcement for details on upgrading.

### Can I relay outbound mail through an external smart host to improve deliverability?

Yes, smart-host relay configuration is supported and is a common compromise for self-hosted email deliverability.

## Alternatives

- Cloudron: Cloudron is a self-hosting platform for running and maintaining web apps on your own server.
- Courier MTA
- Exim: Exim is a message transfer agent (MTA) developed at the University of Cambridge for use on Unix systems connected to the Internet.
- Haraka: Haraka is an open-source, high-performance SMTP mail transfer agent (MTA) written in Node.js.
- Modoboa: Modoboa is an open-source mail hosting and management platform that provides a web interface, administration panel, and webmail for self-ho…
- Poste.io: Poste.io is a free self-hosted mail server that provides POP3, SMTP, IMAP, spam filtering, WebMail, and web administration for individuals…
- Postfix: Postfix is a fast, secure SMTP (Simple Mail Transfer Protocol) mail server that administrators can use to accept, relay, and deliver email…
- Roundcube: Roundcube is a free, open-source, browser-based, multilingual IMAP (Internet Message Access Protocol) webmail client that lets self-hosted…
- Sendmail: Sendmail is a general purpose internetwork email routing facility that supports many kinds of transfer and delivery methods, including the…
- Stalwart: Stalwart is an open-source, all-in-one email server that unifies JMAP, IMAP (Internet Message Access Protocol), and SMTP (Simple Mail Trans…
- WildDuck: WildDuck is a scalable, no-single-point-of-failure IMAP and POP3 mail server.
- docker-mailserver: A production-ready, full-featured mail server that runs in a single Docker container, bundling SMTP, IMAP, LDAP, anti-spam, antivirus, and…

---
Source: Our Local Host (https://ourlocalhost.com/app/7856/mail-in-a-box), the self-hosted and open-source app directory.
