Skip to content
An event driven SMTP server
JavaScript Other
Latest commit 867df7b @msimerson msimerson Merge pull request #1332 from haraka/1288-outbound-pid
remove type check from pid match
Failed to load latest commit information.
bin Allow for missing smtp.ini if smtp.yaml or smtp.json are present
cfreader fix flat files if \r\n lies...
config updates for 2.7.3 release
contrib add debian init.d file
docs Fix loading plugins as packages
http add HTTP support
plugins Merge pull request #1330 from chazomaticus/fix-dkim-verify
tests Fix loading plugins as packages
.eslintrc lint: don't cuddle else
.gitignore switch to for coverage reporting
.gitmodules working on packaging change.
.jshintrc replace infile jshint with .jshintrc
.travis.yml update travis for node 4.2
Changes update Changes for 2.7.3 release
Dockerfile Use latest Phusion image (83MB vs 413MB) and Node 5
Gruntfile.js lint: don't cuddle else
LICENSE LICENSE and TODO files switch to for coverage reporting
TODO add HTTP support add queue_outbound config option
address.js lint: don't cuddle else
appveyor.yml appveyor: install grunt-cli
attachment_stream.js lint: don't cuddle else
chunkemitter.js lint: don't cuddle else
config.js one var per line
configfile.js Allow ":" (double point) in ini config as in keys
connection.js Pause connection for hook_reset_transaction. Fixes #1235
constants.js lint: don't cuddle else
dkim.js introduce eslint and consistent 4-space indents
dsn.js lint: don't cuddle else
fsync_writestream.js lint: don't cuddle else
haraka.js Change process.exit calls to use exit() to ensure stdout stderr buffe… [DOCKER] Direct stdout/err to console, not file
line_socket.js reference issue #573
logger.js logger: ignore empty/null/false arguments
mailbody.js refactor mailbody.parse_end, noop
mailheader.js Improve handling of broken messages
messagestream.js Now passing options parameter to MessageStream get_data
net_utils.js one var per line
outbound.js remove type check from pid match
package.json updates for 2.7.3 release
plugins.js Fix loading plugins as packages
result_store.js show array when it has length
rfc1869.js eslint: cleanup trailing whitespace
run_tests eslint: cleanup trailing whitespace
server.js Change process.exit calls to use exit() to ensure stdout stderr buffe…
smtp_client.js warn if enable_tls is set and certs are missing
spf.js lint: don't cuddle else
timer_queue.js lint: don't cuddle else
tls_socket.js introduce eslint and consistent 4-space indents
transaction.js Improve handling of broken messages
utils.js one var per line

Haraka - a Node.js Mail Server

Build Status Coverage Status Windows Status

Haraka is a highly scalable node.js email server with a modular plugin architecture. Haraka can serve thousands of concurrent connections and deliver thousands of messages per second. Haraka and plugins are written in asyncronous JS and are very fast.

Haraka has very good spam protection (see plugins) and works well as a filtering MTA. It also works well as a MSA running on port 587 with auth and dkim_sign plugins enabled.

Haraka makes no attempt to be a mail store (like Exchange or Postix/Exim/Qmail), a LDA, nor an IMAP server (like Dovecot or Courier). Haraka is typically used with such systems.

Haraka has a scalable outbound mail delivery engine built in. Mail marked as relaying (such as via an auth plugin) is automatically queued for outbound delivery.

Getting Help


Getting started with Haraka

Why Use Haraka?

Haraka's plugin architecure provides an easily extensible MTA that complements traditional MTAs that excel at managing mail stores but do not have sufficient filtering.

The plugin system makes it easy to code new features. A typical example is providing qmail-like extended addresses to an Exchange system, whereby you could receive mail as, and yet still have it correctly routed to This is a few lines of code in Haraka.

Plugins are provided for running mail through SpamAssassin, validating HELO names, checking DNS Blocklists, and many others.

Installing Haraka

Haraka requires node.js to run. Install Haraka with npm:

npm install -g Haraka

After installion, use the haraka binary to set up the service.

Running Haraka

First, create the service:

haraka -i /path/to/haraka_test

That creates the directory haraka_test with config and plugin directories within. It also sets the host name used by Haraka to the output of hostname.

If hostname is not correct, edit config/host_list. For example, to receive mail addressed to, add to the config/host_list file.

Finally, start Haraka using root permissions:

haraka -c /path/to/haraka_test

And it will run.

Configure Haraka

To choose which plugins run, edit config/plugins. Plugins control the overall behaviour of Haraka. By default, only messages to domains listed in config/host_list will be accepted and then delivered via the smtp-forward plugin. Configure the destination in config/smtp_forward.ini.

Read the Fine Manual

haraka -h plugins/$name

The docs detail how each plugin is configured. After editing config/plugins, restart Haraka and enjoy!

Running from git

If you are unable to use npm to install Haraka, you can run from git by following these steps:

First clone the repository:

$ git clone
$ cd Haraka

Install Haraka's node.js dependencies locally:

$ npm install

Edit config/plugins and config/smtp.ini to specify the plugins and config you want.

Finally run Haraka:

$ node haraka.js

License and Author

Haraka is MIT licensed - see the LICENSE file for details.

Haraka is a project started by Matt Sergeant, a 10 year veteran of the email and anti-spam world. Previous projects have been the project leader for SpamAssassin and a hacker on Qpsmtpd.

Something went wrong with that request. Please try again.