Mailinabox is an integrated server that lets you run your own mail service provider.
It includes:
- Roundcube Webmail
- Nextcloud Contacts
- A Control Panel
- automatic DNS configuration
- spam filtering
- greylisting
- backups to Amazon S3
- static website hosting
- Let's Encrypt free TLS (SSL) certificates
Step 1: Register a domain name
Firstly, you need to register a new domain name or use an existing domain name. In this tutorial, we assume the domain name we are using is example.com
, so the hostname of yoru Mailinabox server should be box.example.com
.
Please note that only the TLDs that support DNSSEC can be used.
Step 2: Create a new Vultr server
Operating system
It is highly recommended that you start with a purely new Vultr server. You must choose the Ubuntu 14.04 x64
operating system and a machine with at least 1 GB of RAM.
Here, we assume your server's IP address is <Your_IP>
.
Change the hostname & add DNS record
Set the hostname to box.example.com
. Then, in your domain's DNS control panel, add an A record named box.example.com
resolved to the IP address of your new server.
Reverse DNS
Under the "settings" tab of your Vultr server dashboard, replace the reserve DNS value with box.example.com
.
Step 3: Domain name configuration
Because manually configuring the DNS records with an external DNS provider will be complicated, Mailinabox provides glue records module as an alternative. If you don't want this, you can still manually configure the domains.
To take advantage of its glue records function, you need to add NS records named NS1.box.example.com
and NS2.box.example.com
, both pointed to IP address of your Vultr server.
Step 4: Install mailinabox server
Log into your Vultr server using SSH and input the following commands:
ssh -i yourkey.pem [email protected]<Your_IP>
curl -s https://mailinabox.email/setup.sh | sudo bash
If the installation is successful, you will see the instructions as following:
Your Mail-in-a-Box is running.
Please log in to the control panel for further instructions at:
https://<Your_IP>/admin
You will be alerted that the website has an invalid certificate. Check that
the certificate fingerprint matches:
C0:9B:FF:04:2B:2D:8F:47:5A:8B:D5:88:B7:05:D3:4B:6C:22:80:5F
Step 5: Manually configure DNS records
If you have configured the glue records in step 3, you can skip this step.
Log into your mailinabox server at https://<Your_IP>/admin
, and then go to the DNS (Custom/External) > External DNS section of the control panel, and copy the DNS records into your domain's DNS control panel.