Haraka – Superfast mail server based on node.js

Categories Mail Servers

From Haraka’s official website:

Haraka is an open source SMTP server written in Node.js which provides extremely high performance coupled with a flexible plugin system allowing Javascript programmers full access to change the behaviour of the server.

Admit it – Javascript is everywhere. Node.js brings the power of event-driven asynchronous programming to server-side, allowing programmers to use Javascript to write daemons, servers, and what not. Stuffs which were meant to be done with C/C++/Perl is now being completed in Javascript.

Haraka is a SMTP server written in node.js. It is suuuuuuuper-fast, just ask the guys at Craigslist.

In Web hosting industry dominated by Cpanel, Haraka can co-exist with Exim and can be used as an alternative mail server for clients with large mailing lists. Haraka consumes negligible memory while easing the job off Exim which can cater to normal clients hosted on a Cpanel server.

This guide describes steps to configure Haraka as outgoing mail server only. If you wish to accept emails and deliver it locally you will need to refer the official docs.

1. Install Node.js binary (http://nodejs.org/download/)

2. Install git and Haraka

3. Create symlinks once the installation is complete

4. Also copy over the start-up script

5. Initialize Haraka config directory

6. make changes to config files





7. Fix permissions:

8. Configure chkconfig:

9. And finally.., start Haraka

In case haraka failed to start for any reason, check its log file at /var/log/haraka.log.

If you encounter the following error while starting Haraka:

.. then edit /usr/local/haraka/bin/haraka, and modify its first line to:

.. and Haraka will start fine:

Now that Haraka is up and running, use the following settings to send email:

On a Cpanel server, run Haraka on another port and use it as outgoing email server for bulk mailing/newsletter tasks and spare Exim from the pain!

Further reading: