Have you ever wanted to quickly setup your own dedicated mail server? Setting up a personal email server is very easy to do. We’ll show you everything you need to quickly deploy your own mail server on a ServerMania Hybrid, Cloud, or Dedicated Server using the popular Mail In A Box platform.
Why Create Your Own Mail Server?
There are many reasons why you should setup your own mail server:
- Privacy: When you setup your own mail server, you know that you are the only mailbox on that server sending mail. This means that you can be confident that the privacy of the server is optimal.
- Security: Managing your own mail server means that you can maintain the highest level of security. When other mail users are on the same server, you never know what security policies may be compromised.
- Reliability: When you create your own mail server, you never have to worry about other users sending abusive mail on the server. This ensures reliability and uptime can be easily maintained.
Mail Server System Requirements
- A Hybrid, Cloud, or Dedicated Server with ServerMania
- Ubuntu Operating System
- At least 25Gb Disk Space
- Minimum 1GB of RAM
Mail Server Components
This guide will quickly and automatically setup every required component required to create your own mail server:
- SMTP (postfix)
- IMAP (dovecot)
- CardDAV/CalDAV (Nextcloud)
- Exchange ActiveSync (z-push)
- Webmail (Roundcube)
- Static website hosting (nginx)
- Spam filtering (spamassassin)
- Greylisting (postgrey)
- DNS (nsd4) with SPF, DKIM (OpenDKIM), DMARC, DNSSEC, DANE TLSA, and SSHFP records automatically set
- Backups (duplicity)
- Firewall (ufw), intrusion protection (fail2ban), and system monitoring (munin)
We’ll start by ordering a Hybrid, Cloud, or Dedicated Server from ServerMania.com – this will be the server that will host the email server software.
If you’re setting up an email server for yourself, then a Hybrid Server is typically the best choice. It’s a slice of a dedicated server. It combines the power of a dedicated server with the price of a virtual server. Hybrid Servers start at just $29/month, and when you consider that you can use the server for multiple activities like creating your own VPN, setting up your own cloud backup, or hosting a website, it’s a great deal.
If you’re setting up an email server for your business, then you may wish to consider a Cloud or Dedicated Server. Dedicated Servers start as low as $45/month and it’s a server completely dedicated to you. It’s the perfect choice for those looking for the ultimate in power and server performance.
Under Products / Services, simply navigate to the server type you wish to select, pick a server, and click customize.
During checkout, select Ubuntu as the operating system.
Your Hybrid Server will be ready in a few minutes, and Dedicated Servers are typically provisioned within 24 hours.
Mail Server Installation Instructions
We’ll begin by logging into root via SSH to your server.
You will find your public IP address in the welcome email we send you. Open your favourite SSH client or terminal and execute the following command:
Update all server packages:
Install git, which will be used to download the mail server install script:
apt-get install git
Download the mail server installation files:
git clone https://github.com/mail-in-a-box/mailinabox
Change into the script directory:
Start the installation script:
During the install, enter the email address and domain that the mail server will be based upon. You will then select geographic area and nearest city.
Once the install is complete, we will finish the process by running the configuration script:
We’ll complete the installation by rebooting the server:
Installation of your personal mail server is now complete.
Configure Domain Settings
You will need to configure a few components at your domain name registrar in order to connect your domain to your mail server:
- Update the glue records for ns1.yourdomain.com and ns2.yourdomain.com to point to the main IP of your server
- Set the nameservers of the domain to ns1.yourdomain.com and ns2.yourdomain.com
Mail Server Management
Now that installation is complete, you can now login to the mail server control panel at https://IP-Address/admin
This page includes a variety of checks that ensure your mail server is configured properly. It also contains instructions on accessing webmail and configuring a mail client like Outlook.
You have now setup your own mail server. It really was pretty easy, wasn’t it? Need help? Contact our support team for assistance.