Host your own email using iRedMail and DigitalOcean

There are several reason why you would host your own email. With iRedmail and DigitalOcean you could host your own email server starting from $5 a month, unlimited domains and accounts. Key features are:

  • Unlimited emails and domains
  • IMAP, POP and roundcube webinterface
  • Anti-spam


You should own at least one domain name.
The required skill is that you are a bit familiar with the Linux terminal and SSH.

Creating the server

Go to DigitalOcean and login or sign up if you aren’t already a customer. You should add some money from your paypal or credit card to your account if you haven’t already.

There are two types of servers available:

  • Low traffic/user email server without virus scanning
  • Medium/High traffic/user email server

Choose what suits your needs, although I recommend  Medium/High. Different configuration apply based on the server you’ve chosen.

Add a droplet(VPS/server).
If you’ve chosen for Low traffic, choose the cheapest one. The cheapest one  is currently $5 a month and contains 512MB memory and 1 CPU. Medium/High traffic requires at least 1GB of ram.

Enter a valid hostname, when in doubt check

Choose for CentOS 6.x x64 as Linux distribution.

You should receive an email when the creation finished. The email contains the ip address  and root password.

You can now connect to your fresh installed server.

 Installing mail services

Download the latest stable iRedMail tarball from

Unpack the tarball.

Change into the iredmail directory.

Make the install script executable.

Execute installer.

You are now prompted a blue install  screen.
Follow Be sure tot remember the postmaster’s password, you’ll need to user it later on.

Once you finished configuration the installer will automatically install the dependencies.

Custom tweaking for Low traffic server

Because Low traffic server has very limited memory we need to do some tweaking. These commands only apply for Low traffic!.

Open the amavis configuration file with nano. Use CTRL + X to close nano.

Go to line 13 and change it to:

This will disable virus checks trough clam-av.

Disable clam-av on startup


Post installation and tweaking

The commands posted here are both for Low and Medium/High traffic.

Checkout for important things after installtion.

Your DNS should be edited to receive mail, please see for more information.

Last but not least, reboot the server to enable all services.


Congratulations with your self hosted email server!


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">