Site icon David Yin's Blog

How to choose a VM for iRedMail Email server

In the past week, I have been looking for a new solution for my Email services. I tried a lot of VMs from different providers, such as Google, Oracle, Vultr, etc.

OK, let me tell the story one by one.

At first, I want to host the Email server by myself. It is called a self-host email server. I make the decision to use iRedMail. It is an Opne-Source Mail Server solution. I am not going to introduce iRedMail here today, maybe later.

The requirement of iRedMail:

  • A FRESH, working RHEL or CentOS system. Supported releases are listed on Download page.
  • At least 4 GB memory is required for a low traffic production mail server with spam/virus scanning enabled.
  • Make sure 3 UID/GID are not used by other user/group: 2000, 2001, 2002.

I saw somewhere post said it can be run on a 2GB system. I did try a test installation on Vultr Free VM, it has 1vCPU/512MB RAM/10GB SSD. The CPU usage is 100% all the time.  So memory is the KEY to use it. I have to shut down it.

Now, let’s go.

Test on HomeServer

The first installation trial is on my HomeServer in my Homelab in my storage room. So it is behind the firewall and on my Proxmox VE machine. I give it 4GB 2CPU, 200GB storage, etc. Installation is OK. When I tried to send an email out to Gmail. It has a problem, NO PTR record for the IP.  I pointed the MX record to the public IP of my Internet connection. This IP address is provided by ISP. I believe no ISP will give you the PTR record if you are a Home user with dynamic IP.

What is a DNS PTR record?

PTR is Pointer record. Provide the domain name associated with an IP address. A DNS PTR record is exactly the opposite of the “A” record.

Here is an example:

DNS lookup: smtp.perfora.net  point to 74.208.5.2

Reverse lookup: 74.208.5.2 point to smtp.perfora.net

They are match. It is very importanted for email system. A lot of big email service providers use it to defend the spammers.

The other very important issue for hosting an Email system at home is the Dynamic IP. All the IP address of the home Internet connection is dynamic IP released from ISP. Even it is not changing for years, it is still dynamic IP.  Zoho Email server does not accept emails from dynamic IP addresses.  I believe a lot of email service providers may do it in the same way.

Test on Oracle Cloud

The next one, I tested is on Oracle Free account.

Oracle provides Always Free service with ARM CPU, and 24GB RAM. It meets the iRedMail requirement.

I created a VM. It has 1OCPU, 6GB RAM, and 200GB storage.

All good. But it also has no PTR record. As a free service user, I can not add it by myself. I can not find a proper way to ask support to add it for me.

So, give it up.

Test on Google Cloud

It is a big one. Google Cloud provides one e2-micro instance per month. It has 2vCPUs, 1GB Ram, and 30GB storage.

I made an E2-medium VM, 2 vCPU, 4GB memory.

Installation is smooth. Making a PTR record is OK. Just need to verify the ownership of the domain. It can be done in Google Search Console.

During the test of sending email, I found Google block port 25. The official guide.

It is no way to ask Google to open port 25 for me.

Until now the Free Services I can access are all tested and failed the mission.

Contabo – Content Across Borders

All the issues above I make a list below:

Meeting these four requirements is easy if I look around the VPS market. But for the paid service, the price is another KEY question.

I go through some forums and posts about it. Contabo is the NO.1 choice.

Contabo’s FAQ descript what kinds of projects are allowed on their VPS.

Our customers use our virtual private servers for everything from self-hosting personal websites and file hosting to deploying production apps and hosting Minecraft game servers.

Typically, our customers use Cloud VPS for:

  • Backups.
  • Website hosting.
  • Back-end Software-as-a-Service (SaaS) solutions.
  • Email server hosting.
  • Databases.
  • Self-hosting various services and apps like Bitwarden and Nextcloud.
  • Microservices infrastructure.
  • Game server hosting (check out our sister brand GPORTAL for dedicated game servers).
  • Torrent seedbox.
  • Crypto projects like staking Ethereum and farming Chia.

Email server hosting is on the list.

Contabo VPS started from Cloud VPS S to XL.

Cloud VPS S is $8.49/month

My choice is Contabo Cloud VPS S.  Now this Blog is also at this VPS.  The not-complete VPS performance benchmark is posted here.

I am going to use this VPS for the Email server and Website server.

 

 

 

Exit mobile version