Nokor Web

🕑 24/7/365 Support
☏ (+855)12 777 467 (Telegram)
☏ (+855)10 88 18 28

How to Setup Email Server With HestiaCP (Cambodia)

Setting up an email server can be a daunting task, but with HestiaCP, it becomes a much more manageable process. HestiaCP is an open-source web hosting control panel that simplifies the management of web servers. In this guide, we’ll walk you through the steps to set up an email server using HestiaCP.

Prerequisites

Before we begin, make sure you have the following:
MinimumRecommended
CPU1 core, 64-bit4 cores
Memory1 GB (no SpamAssassin and ClamAV)4 GB
Disk10 GB HDD40 GB SSD
Operating SystemDebian 10, 11 or 12
Ubuntu 20.04, 22.04 LTS
Latest Debian
Latest Ubuntu LTS

Step 1: Install HestiaCP

1. Update Your System:
sudo apt update && sudo apt upgrade -y
2. Download and Run the HestiaCP Installation Script:
Download the installation script for the latest release:
wget https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install.sh
If the download fails due to an SSL validation error, please be sure you’ve installed the ca-certificate package on your system – you can do this with the following command:
apt-get update && apt-get install ca-certificates
To begin the installation process, simply run the script and follow the on-screen prompts:
bash hst-install.sh
If bash hst-install.sh doesn’t work, add –force.
3. Follow the Installation Prompts:
Follow the following options:
Would you like to continue with the installation? [Y/N]: Choose Y.
Provide an email valid address.
Enter a fully qualified domain. For instance, hestiacp.domain.com
Note: At the end of the HestiaCP installation script, you’ll see a message that includes the admin username and password. Make sure to note these down.
4. Access the HestiaCP Web Interface:
Once the installation is complete, you can access HestiaCP through your web browser. The URL and login credentials will be displayed at the end of the installation process.
http://your-server-ip:8083
http://hestiacp.domain.com:8083

Step 2: Create a New User and Domain

1. Log in to HestiaCP:
Open your web browser and log in to HestiaCP using the admin credentials provided during installation.
2. Create a New User:
3. Log in as the New User:
Log out of the admin account and log in with the new user account you just created.
4. Add a New Domain:

Step 3: Configure DNS Settings

To ensure your email server functions correctly, you need to configure the DNS settings for your domain.
1. Add DNS Records:
2. Example DNS Records:
Type Name Value
A yourdomain.com. your-server-ip
MX yourdomain.com. 10 yourdomain.com.
TXT yourdomain.com. "v=spf1 mx ~all"
TXT default._domainkey.yourdomain.com. "v=DKIM1; k=rsa; p=your-public-key"
TXT _dmarc.yourdomain.com. "v=DMARC1; p=none"

Step 4: Set Up Email Accounts in HestiaCP

1. Add an Email Account:

Step 5: Secure Your Email Server

Securing your email server is crucial to prevent unauthorized access and spam.
1. Enable SSL/TLS:
2. Enable Anti-Virus, Spam Filter and DKIM:

Conclusion

Setting up an email server with HestiaCP is a straightforward process that involves installing the control panel, creating users and domains, configuring DNS settings, creating email accounts, and securing your server. By following this guide, you’ll have a functional email server that you can use for personal or business communication.

Frequently Asked Questions​

Roundcube will not work after Hestia installation

Due a bug, permissions for roundcube are not the right ones so execute these commands to fix them:

chown -R hestiamail:www-data /etc/roundcube/

find /etc/roundcube/ -type f -iname "*php" -exec chmod 640 {} \;

chown -R hestiamail:www-data /var/lib/roundcube/

chown -R hestiamail:www-data /var/log/roundcube/

How can I activate Antivirus and Spam Filter?

installed both spamassassin and clamaav:
apt install spamassassin clamav clamav-daemon

Then edited the hestia config file:
nano /usr/local/hestia/conf/hestia.conf

At the beginning add:
ANTISPAM_SYSTEM=‘spamassassin’
ANTIVIRUS_SYSTEM=‘clamav-daemon’
Scroll to Top