+0
日增长
5,637
stars
719
forks
138
watchers
2,260
prs
1,252
issues
50
releases
README
Haraka — a Node.js Mail Server [![Build][ci-img]][ci-url] [![Cover][cov-img]][cov-url] [![Qlty][qlty-img]][qlty-url] [![OpenSSF][ssf-img]][ssf-url] Haraka is a highly scalable [Node.js][1] SMTP server with a modular plugin architecture. It handles thousands of concurrent connections and delivers thousands of messages per second. Haraka and its plugins are written in asynchronous JavaScript, optimised for throughput and low latency. Haraka offers strong spam protection (see [Plugins.md][plugins]) and is widely deployed as a filtering [MTA][3] or as a [MSA][5] on port 465 (and legacy 587) with the auth and [DKIM][6] plugins enabled. Haraka is not a mail store, an [LDA][7], or an IMAP server. It is designed to work alongside those systems. A scalable outbound delivery engine is built in: mail flagged as relaying (for example, by an auth plugin) is queued for outbound delivery automatically. Plugin Architecture Haraka's defining feature is its plugin system. Every SMTP transaction is a sequence of well-defined hooks — connect, helo, mail, rcpt, data, data_post, queue, and more — and each hook can be extended with a few lines of JavaScript. Plugins are asynchronous by default, so a slow lookup against DNS, Redis, or an HTTP API never blocks the server. The result is that behaviours which would require a custom MTA elsewhere are typically a small file in Haraka. For example, accepting qmail-style tagged addresses ([email protected]) and rewriting them to [email protected] before forwarding to an Exchange or IMAP backend looks roughly like this: js exports.hook_rcpt = (next, connection, params) = { const rcpt = params[0] const [user] = rcpt.user.split('-') rcpt.user = user next() } A comprehensive registry of community and core plugins — auth, DNSBLs, DKIM, SpamAssassin, rspamd, Redis, ClamAV, queue backends, and many others — lives in [Plugins.md][plugins]. To write your own, see the [plugin tutorial][tutorial]. Documentation - [Plugins.md][plugins] — plugin registry and configuration reference - [docs/][docs] — core documentation (Connection, Transaction, Outbound, …) - [Tutorial][tutorial] — step-by-step getting started guide - [CHANGELOG.md][changelog] — release notes - [SECURITY.md][security] — security policy and reporting Getting Help - [GitHub Issues][issues] - [Mailing list][mailing-list] (implemented as a Haraka plugin) - [Screencast: Getting started with Haraka][screencast] Installation Haraka requires [Node.js][1]. Install via [npm][npm]: sh npm install -g Haraka Create a service directory: sh haraka -i /path/to/haraka_test This creates haraka_test with config/ and plugins/ subdirectories and sets the host name from hostname(1). Edit config/host_list to add the domains for which Haraka should accept mail. Start Haraka: sh haraka -c /path/to/haraka_test Configuration Edit config/plugins to select active plugins. By default, mail addressed to domains in config/host_list is accepted and forwarded via
Discussions
#3618Enrich Tried all MXs defer with per-MX failure reasons1 comments · 2026-09-09#3612How to properly implement mailing lists?1 comments · 2026-08-08#3606Provide an Official Playground for Haraka on iximiuz Labs0 comments · 2026-07-16#3607Announce: ECSD0 comments · 2026-06-21#3580Haraka 4.0 - async/await API for plugins1 comments · 2026-05-28#3579MTA Hooks support3 comments · 2026-05-21#3523Sending entire message to webhook2 comments · 2026-02-17#3522Haraka handles the issue of email delivery.2 comments · 2026-02-12
Latest release
3.4.0 v3.4.0 2026-11-05Added - graceful restart on SIGUSR2 (3635) Changed - BREAKING: SIGUSR2 restarts workers (was exit); run nodemon with --signal SIGINT - restart handling runs in the master: after upgrade, restart Haraka fully once Fixed - shut down when asked during a restart - reject path traversal in QUEUE DISCARD (3640) - survive worker deaths during restarts (3638) - send PROXY header with internal cmds (3634) - don't miss worker exits in _graceful (3632) - clear PROXY timer on disconnect (3633) - hand over queues on graceful restart, keep other workers' dot files (3637) - don't res