Haraka is a scalable SMTP server built on Node.js. It handles both inbound and outbound email traffic and can be used as a standalone MTA or as a backend server to other mail servers. In this tutorial, we will guide you through the steps of installing Haraka on Debian latest, also known as Debian 10.
Haraka is built on Node.js, so we need to install Node.js on our server first. The latest stable release of Node.js is recommended.
ssh username@server_ip
sudo apt update
sudo apt install nodejs
nodejs --version
The output should be the version number of Node.js.
sudo mkdir /opt/haraka
sudo git clone https://github.com/haraka/Haraka /opt/haraka
sudo chown -R username:username /opt/haraka
Replace "username" with the name of the user you will be running Haraka as.
cd /opt/haraka
sudo npm install
sudo cp config/plugin.sample config/plugins
sudo nano config/plugins
Uncomment the following lines by removing the leading '#' symbol:
rcpt_to.in_host_list=1
queue/smtp_forward:relay_host=your.mail.server.com
rcpt_to.in_host_list=0
Replace "your.mail.server.com" with the IP address or hostname of your mail server.
cd /opt/haraka
sudo npm start
sudo tail -f /opt/haraka/logs/haraka.log
If everything is set up correctly, you should see Haraka startup messages in the logs.
In this tutorial, you learned how to install and configure Haraka on Debian latest. You can now use Haraka to handle your email traffic, either as a standalone MTA or as a backend server to other mail servers.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!