Install iRedmail: Your Own Private E-mail Server in the Cloud
Digital Ocean’s $5/mo. fast SSD servers make a great choice for hosting your email. For a gmail alternative, try FastMail.
Sign in to your instance using the preceding instructions. Follow the steps below to install and configure iRedMail:
sudo su cd /root
[info_box]If you are using an Amazon Micro instance, you’ll want to create a swap file. Otherwise, iRedMail spam software will fail and postfix will drop your outgoing messages. With anti-virus, anti-spam and key-signing features, iRedMail requires 1 GB of memory; AWS Micro provides only 640 KB.[/info_box]
While setting up a swap file is easy, there are some small risk of incurring unbounded internetwork bandwidth charges – so be sure to monitor your site and set up billing alarms as described in the optimization section. However, once you set up a swap file, your micro instance should be stable.
dd if=/dev/zero of=/swapfile bs=1M count=1024 mkswap /swapfile swapon /swapfile
Now, to make the swapfile persistant across reboots, edit the fstab file:
sudo nano /etc/fstab
Add this line:
/swapfile swap swap defaults 0 0
Verify the swap file is active by typing:
It should show something like:
Swap: 1048572 0 1048572
Change the hostname to match your domain e.g. mail.yourdomain.com:
Change your hosts file to include your domain:
Edit it so your domain appears – both for the root and your mail domain:
127.0.0.1 yourdomain.com mail.yourdomain.com localhost
apt-get update reboot
Visit the iRedMail downloads page for the latest release for Ubuntu. Make note of the release version for the steps below e.g. 0.8.4. Return to your server:
sudo su cd /root
wget https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.8.4.tar.bz2 tar xjf iRedMail-0.8.4.tar.bz2 cd iRedMail-0.8.4 bash iRedMail.sh
You’re going to need to create two strong passwords to complete the iRedMail setup. I recommend you use a password generator and storage application such as AgileBits’ 1Password. 1Password is an indispensable everyday tool for me.
You may also be interested in:
- Simplify Your Email with advanced IMAP mail filtering and digests
- How to Install Ubuntu at Digital Ocean
- Top affiliate programs for bloggers
Follow the screenshots below as you continue the installation of iRedMail:
Say Yes to installing the firewall and restarting the firewall:
Wait for iRedMail to install its anti-virus updates.
In the meantime, you need to update your Amazon Security Groups to allow traffic for HTTPS, POPS and IMAPS. In the AWS EC2 Dashboard, add inbound access for the above groups, as shown below:
When installation completes, iRedMail will show you the URLs you can use to access your mail server.
However, you need to reboot one more time:
Also, once installation is complete, move your configuration file to a safe place:
mv /home/ubuntu/iRedMail-0.8.4/config ~/safe_place/config
When you visit your URL, you’ll need to dismiss the SSL warning shown below. You haven’t yet created an SSL certificate so your browser will regularly warn you about whether the site can be trusted. Click Proceed.
Then, you’ll be greeted with the fun Roundcube Login screen. Login with the username and password given to you when you completed the installation:
You’ve got mail! Here’s your inbox:
Note: If you appreciate this site, please check out some of our affiliates:
- Agile Bits 1Password – no need to remember your passwords ever again, except one
- Digital Ocean – fast SSD hosting from the second largest hosting company in the world
- FastMail – a great GMail alternative
- CodeGuard – backup your website automatically with this great service
- WPEngine – professional, scalable WordPress hosting