A fast, highly extensible, and event driven SMTP server
Clone or download
jrb and msimerson enable tls/ssl for rabbitmq amqplib plugin (#2518)
* allow uri scheme to be overridden via protocol config parameter
* document new protocol option in rabbitmq amqplib plugin
Latest commit e0598e7 Oct 19, 2018
Permalink
Failed to load latest commit information.
.github add update Changes to PR template (#2058) Aug 29, 2017
bin create config/me if not present (#2413) May 17, 2018
config add outbound TLS NO-GO feature (#2429) Jun 30, 2018
contrib repackage p0f plugin to NPM (#2076) Sep 10, 2017
docs enable tls/ssl for rabbitmq amqplib plugin (#2518) Oct 19, 2018
http Consistent end of function declaration semicolon (#2336) Feb 12, 2018
outbound Init tls when we send email, not when an old queue file is loaded (#2503 Sep 17, 2018
plugins enable tls/ssl for rabbitmq amqplib plugin (#2518) Oct 19, 2018
tests dkim_sign: reduce log severity, improve log messages (#2499) Sep 17, 2018
.editorconfig Add .editorconfig (#1884) Apr 10, 2017
.eslintrc.yaml Consistent end of function declaration semicolon (#2336) Feb 12, 2018
.gitignore outbound es6 + bug fix (#2197) Oct 15, 2017
.gitmodules working on packaging change. May 24, 2012
.travis.yml Message stream test (#2412) May 14, 2018
CONTRIBUTING.md Create CONTRIBUTING.md (#2131) Sep 28, 2017
Changes.md #1532 Possibility to hide Haraka is at your service from HELO/EHLO fo… Sep 17, 2018
Dockerfile Switch 'setuser root' for sudo in Dockerfile (#1609) Sep 26, 2016
LICENSE LICENSE and TODO files Mar 12, 2011
Plugins.md Fixed links (#2516) Oct 10, 2018
README.md Fixed links (#2516) Oct 10, 2018
TODO Clear off some done tasks (#1928) May 22, 2017
appveyor.yml Message stream test (#2412) May 14, 2018
attachment_stream.js attstream: return self so that we can stack pipe() calls (#2424) May 17, 2018
chunkemitter.js Convert chunkemitter to ES6 class (#2219) Oct 17, 2017
config.js replace the rest of ./config with haraka-config (#2119) Sep 30, 2017
connection.js #1532 Possibility to hide Haraka is at your service from HELO/EHLO fo… Sep 17, 2018
dkim.js dkim: revert destructuring assignment, it handles null badly (#2287) Nov 7, 2017
haraka.js Rewriting the code of `haraka.js` to ES6/ES2015 (#2163) Oct 2, 2017
haraka.sh [DOCKER] Direct stdout/err to console, not file Nov 6, 2015
host_pool.js Use template literals in host_pool.js (#2245) Oct 23, 2017
line_socket.js line_socket: remove superfluous function (#2339) Feb 12, 2018
logger.js mods to logger.js (#2425) Jun 28, 2018
mailbody.js Attempt to mitigate mime part explosion attack (#2447) Jun 15, 2018
mailheader.js Change log level in mailheader.js (#2299) Dec 8, 2017
messagestream.js release Haraka 2.8.21 (#2480) Aug 8, 2018
package.json fix(package): update semver to version 5.6.0 (#2517) Oct 11, 2018
plugins.js Clear timeout on cancel (#2477) Jul 19, 2018
rfc1869.js 2129/use string templates (#2160) Oct 2, 2017
run_tests outbound es6 + bug fix (#2197) Oct 15, 2017
server.js Don't die on invalid commands (#2481) Jul 22, 2018
smtp_client.js create config/me if not present (#2413) May 17, 2018
spf.js spf: convert to ES6 (#2214) Oct 15, 2017
tls_socket.js add outbound TLS NO-GO feature (#2429) Jun 30, 2018
transaction.js release Haraka 2.8.21 (#2480) Aug 8, 2018

README.md

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 asynchronous 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

Screencast

Getting started with Haraka

Why Use Haraka?

Haraka's plugin architecture 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 installation, 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.