A fast, highly extensible, and event driven SMTP server
JavaScript Other
Latest commit fa1bb44 Feb 23, 2017 @msimerson msimerson committed on GitHub block js attachments (#1837)
Failed to load latest commit information.
.github system info table format for issue reporting (#1660) Oct 16, 2016
bin fixing one bug hilighted another Jan 31, 2017
config block js attachments (#1837) Feb 24, 2017
contrib updated BSD rc.d REQUIRE targets (#1750) Dec 29, 2016
docs helo.checks: bring plugin into alignment with docs (#1833) Feb 24, 2017
http lint fixes, mostly variable scoping issues Feb 3, 2017
plugins helo.checks: bring plugin into alignment with docs (#1833) Feb 24, 2017
tests helo.checks: bring plugin into alignment with docs (#1833) Feb 24, 2017
.eslintrc.json eslint:recommended (#1790) Jan 31, 2017
.gitignore corrected variable name Mar 24, 2016
.gitmodules working on packaging change. May 24, 2012
.travis.yml Cache the node_modules folder (#1809) Feb 11, 2017
Changes release 2.8.13 Feb 2, 2017
Dockerfile Switch 'setuser root' for sudo in Dockerfile (#1609) Sep 26, 2016
LICENSE LICENSE and TODO files Mar 12, 2011
README.md Update dependencies to enable Greenkeeper 🌴 (#1778) Jan 25, 2017
TODO add HTTP support Apr 9, 2015
appveyor.yml fixes for file paths on Windows (#1755) Jan 4, 2017
attachment_stream.js This may or may not fix issues with short atts. Feb 6, 2017
chunkemitter.js eslint:recommended (#1790) Jan 31, 2017
config.js add server integration test Jan 31, 2017
configfile.js eslint:recommended (#1790) Jan 31, 2017
connection.js more results (#1816) Feb 12, 2017
dkim.js eslint:recommended (#1790) Jan 31, 2017
dsn.js eslint:recommended (#1790) Jan 31, 2017
fsync_writestream.js lint: require space before function declaration (#1784) Jan 27, 2017
haraka.js lint: require space before function declaration (#1784) Jan 27, 2017
haraka.sh [DOCKER] Direct stdout/err to console, not file Nov 6, 2015
host_pool.js lint: require space before function declaration (#1784) Jan 27, 2017
line_socket.js eslint:recommended (#1790) Jan 31, 2017
logger.js remove logger.colorize code for legacy node version Jan 31, 2017
mailbody.js This may or may not fix issues with short atts. Feb 6, 2017
mailheader.js eslint:recommended (#1790) Jan 31, 2017
messagestream.js eslint:recommended (#1790) Jan 31, 2017
outbound.js Fix outbound logger (#1827) Feb 13, 2017
package.json fix(package): update js-yaml to version 3.8.0 (#1815) Feb 12, 2017
plugins.js add an additional plugin search path to account for the module-based … Feb 6, 2017
rfc1869.js eslint:recommended (#1790) Jan 31, 2017
run_tests Create an outbound queue filename handler (#1792) Feb 6, 2017
server.js fixing one bug hilighted another Jan 31, 2017
smtp_client.js fix forwarding with clinet authentication over TLS (forward to gmail) (… Feb 6, 2017
spf.js eslint:recommended (#1790) Jan 31, 2017
timer_queue.js Log number of queue items being drained Aug 7, 2016
tls_socket.js eslint:recommended (#1790) Jan 31, 2017
transaction.js This may or may not fix issues with short atts. Feb 6, 2017


Haraka - a Node.js Mail Server

Build Status Coverage Status Windows Status Greenkeeper badge

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 Postfix/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.