A Node.js Email Server project
JavaScript Other
Pull request Compare This branch is 33 commits ahead, 697 commits behind smfreegard:master.
Failed to load latest commit information.
.github add issue, PR, and contributing templates Feb 18, 2016
bin Copy config/plugins too Feb 26, 2016
config remove dnsbl.zones, so overrides are better Mar 1, 2016
contrib add debian init.d file Nov 25, 2015
docs bounce: skip single_recipient check for relays/private_ips Mar 10, 2016
http add HTTP support Apr 9, 2015
plugins Merge branch 'master' of https://github.com/haraka/Haraka Apr 1, 2016
tests Encode high-bit headers with continuations. Mar 31, 2016
.eslintrc remove unused vars Feb 24, 2016
.gitignore corrected variable name Mar 24, 2016
.gitmodules working on packaging change. May 24, 2012
.jshintrc replace infile jshint with .jshintrc Nov 12, 2014
.travis.yml enable no-shadow lint warnings Feb 23, 2016
Changes update Changes for 2.7.3 release Feb 4, 2016
Dockerfile Use latest Phusion image (83MB vs 413MB) and Node 5 Nov 6, 2015
Gruntfile.js lint: don't cuddle else Oct 3, 2015
LICENSE LICENSE and TODO files Mar 12, 2011
README.md switch to codecov.io for coverage reporting Nov 22, 2015
TODO add HTTP support Apr 9, 2015
UPGRADE.md update for eslint 2 compat Feb 14, 2016
appveyor.yml appveyor: install grunt-cli Sep 22, 2015
attachment_stream.js remove unused vars Feb 24, 2016
chunkemitter.js lint: don't cuddle else Oct 3, 2015
config.js remove unused vars Feb 24, 2016
configfile.js remove unused vars Feb 24, 2016
connection.js Set verify=NO correctly when no certificate presented Mar 31, 2016
dkim.js Remove fs module from dkim.js Feb 29, 2016
dsn.js lint: don't cuddle else Oct 3, 2015
fsync_writestream.js enable no-shadow lint warnings Feb 23, 2016
haraka.js Replace exit module with a better workaround Mar 11, 2016
haraka.sh [DOCKER] Direct stdout/err to console, not file Nov 6, 2015
line_socket.js smtp_forward.md: reference issue #573 Dec 17, 2014
logger.js Replace exit module with a better workaround Mar 11, 2016
mailbody.js Support banners on empty body parts Feb 27, 2016
mailheader.js Encode high-bit headers with continuations. Mar 31, 2016
messagestream.js Now passing options parameter to MessageStream get_data Jan 23, 2016
net_utils.js remove TLD stuff to haraka-tld Feb 6, 2016
outbound.js Allow for override for inbound/outbound Feb 24, 2016
package.json require node 0.10.43+ Mar 30, 2016
plugins.js plugins.js: small refactoring Mar 1, 2016
result_store.js show array when it has length Dec 15, 2015
rfc1869.js eslint: cleanup trailing whitespace Sep 22, 2015
run_tests remove cfreader/* to haraka/haraka-config Feb 21, 2016
server.js Replace exit module with a better workaround Mar 11, 2016
smtp_client.js initial workaround Mar 30, 2016
spf.js tests/plugins/* now depend on haraka-test-fixtures Feb 29, 2016
timer_queue.js lint: don't cuddle else Oct 3, 2015
tls_socket.js Fix outbound requesting cert and rejecting unauth Mar 18, 2016
transaction.js remove unused vars Feb 24, 2016
utils.js one var per line Sep 22, 2015


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 user-anyword@domain.com, and yet still have it correctly routed to user@domain.com. 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 user@domain.com, add domain.com 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 https://github.com/haraka/Haraka.git
$ 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.