Very few firms offer free email hosting for a domain you own. For using additional domains, you’ll have to upgrade your account by purchasing a subscription plan. The plans may cost between $12 to $30 per year.
I decided to host my own email server after my email plan was expired. I referred to a brilliant online tutorial that helped me set up Postfix/Dovecot on my VPS. After 10 months of using Postfix/Dovecot, I’ve now rebought the Zoho Mail email hosting plan which I was using before switching to the open-source server/MTA. The pros and cons of the self-hosted mail server I’ve shared below are based on my experiences with Dovecot/Postfix.
Self hosted mail server cons
RAM
My VPS has 4GB RAM. The average RAM usage was 2GB. When I disabled the Postfix, Dovecot service, the RAM usage dropped to a sweet 1.2GB. So, 800 MB of system memory was freed. Email servers are not lightweight. If your server has low RAM, you will have to add 512 MB to 1GB more RAM to the server. If you do so, the hosting plan subscription fee will increase.
Spam
After hosting my own email server, I received more junk emails than useful emails. It was really annoying to read the titles of the emails and getting rid of them. Although you can install SpamAssassin and configure it to add the label “[Spam]” (or something else) to the mail title, you should configure your email client application to move the emails with the title containing [Spam] to the junk folder. To do so, you’ll have to create a filter.
Email clients
Mails are stored on the server in a folder. To read them, you must open the directory where the mails are saved and use the cat
Linux command or open the mail file with a text editor such as Vi, nano, etc. With the ls -ltr
command, you can see the date on which the mail was sent to your mailbox. To read mails on the PC, you’ll have to use software such as Thunderbird, Mailspring, ClawsMail, etc. Only a few applications can auto-configure the settings for the email account.
You don’t really save money
Some users may host their own mail server thinking that they’ll save money. The fact is that you’ll have to buy a domain for MX address or create a subdomain, enable an SSL certificate for the domain, and specify the path to the certificate in the configuration file of Postfix/Dovecot. Domain costs $1 to $20. If your server has low RAM, you might have to buy a VPS with more RAM or upgrade your existing server.
Security
If someone hacks your email account, you’ll be in a problem. Hackers employ brute force techniques to take over email servers. To make sure that your account is protected from brute force attacks, you should use a strong password and configure Fail2Ban to block IP addresses that are trying to access your email account. Unlike email hosting service providers that allow users to activate the two-factor authentication system with a few clicks of a button, you’ll have to add 2FA to Dovecot by yourself if you want to secure your account.
Issues
Although the open-source email servers work like a charm, sometimes because of the VPS error, they may stop functioning. You’ll have to do minor troubleshooting like this by yourself.
Self hosted email server pros
Unlimited domain email hosting
If server RAM is not an issue and you don’t have a problem in using the Linux OS in command line mode, you can host your own email server and create unlimited email IDs for as many domains as you want. It is easy to add email IDs once Postfix and Dovecot are set up correctly. You just have to log in to the MySQL server and run a MySQL insert query to insert new records in the virtual alias and virtual domains table. Some email hosting companies restrict the number of messages the users can send per minute/hour. If you send more messages than the threshold value, the company will temporarily block your account from sending more emails. If you host your own email server, you can send as many emails as you want.
Learning
You’ll learn the following things if you set up your own mail server:
- Installation of SSL certificate on a VPS manually.
- Configuring Postfix/Dovecot/SpamAssassin/Fail2ban.
- Inserting records in the database table and viewing them.
- Checking log files to find brute force attacks.
- And more.
Final thoughts: Email hosting is of two types – hosted and self-hosted. If you go for the hosted option, you’ll only have to pay the subscription fee. The company offering the service will take care of the technical issues. If you host your own mail server, you’ll have to take care of the server by yourself.
Image source: Pixabay