Haraka logo

Haraka

High-performance Node.js SMTP server with modular plugin architecture

Haraka is a scalable, asynchronous email server built on Node.js that handles thousands of concurrent connections with extensible plugins for filtering, authentication, and relay.

Haraka banner

Overview

Modern SMTP Infrastructure for Developers

Haraka is a high-performance email server built entirely in Node.js, designed to handle thousands of concurrent connections and deliver thousands of messages per second. Its asynchronous, event-driven architecture makes it exceptionally fast and resource-efficient compared to traditional mail transfer agents.

Plugin-First Architecture

Unlike monolithic mail servers, Haraka's modular plugin system lets you compose exactly the functionality you need. Whether you're building a filtering MTA to protect existing mail infrastructure, running a mail submission agent with DKIM signing and authentication, or creating custom email workflows, plugins provide the building blocks. The ecosystem includes spam protection via SpamAssassin, DNS blocklist checking, HELO validation, and dozens more.

Deployment & Integration

Haraka intentionally focuses on mail transfer and filtering rather than storage or retrieval. It's designed to work alongside systems like Postfix, Exchange, or Dovecot—complementing their strengths while adding powerful filtering and routing capabilities. The built-in outbound delivery engine automatically queues authenticated messages for relay. Installation via npm takes seconds, and configuration through simple text files and JavaScript plugins makes customization straightforward for developers familiar with the Node.js ecosystem.

Highlights

Handles thousands of concurrent connections with asynchronous Node.js performance
Modular plugin architecture for spam filtering, authentication, DKIM signing, and custom logic
Built-in outbound mail delivery engine with automatic queueing for relay messages
Designed as filtering MTA or MSA to complement existing mail storage systems

Pros

  • Exceptional performance and scalability through event-driven, non-blocking architecture
  • Easy customization with JavaScript plugins—no need to learn complex MTA configuration languages
  • Strong spam protection ecosystem with SpamAssassin, DNSBL, SPF, and DKIM support
  • Lightweight footprint focused on transfer and filtering rather than bloated all-in-one functionality

Considerations

  • Not a complete mail solution—requires separate systems for storage, IMAP, and local delivery
  • Smaller community and ecosystem compared to established MTAs like Postfix or Exim
  • Requires Node.js expertise for advanced plugin development and troubleshooting
  • Less mature documentation and fewer deployment examples than traditional mail servers

Managed products teams compare with

When teams consider Haraka, these hosted platforms usually appear on the same shortlist.

Bird Email API logo

Bird Email API

Email sending API & SMTP relay with analytics and deliverability tooling

Mailgun logo

Mailgun

Transactional email API with SMTP/HTTP sending, routing, and deliverability tools

Mailjet logo

Mailjet

Email API & SMTP relay with transactional and marketing sending

Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.

Fit guide

Great for

  • Developers building custom email filtering or routing logic with JavaScript
  • Organizations needing high-throughput SMTP relay or filtering in front of existing mail infrastructure
  • Teams running mail submission agents (port 587) with authentication and DKIM signing
  • Projects requiring programmatic email workflows that traditional MTAs handle poorly

Not ideal when

  • Organizations seeking all-in-one mail servers with built-in storage and IMAP access
  • Teams without Node.js experience or JavaScript development capabilities
  • Environments requiring extensive enterprise support contracts and vendor relationships
  • Simple forwarding scenarios where lightweight alternatives like nullmailer suffice

How teams use it

Spam Filtering Gateway

Deploy Haraka in front of Exchange or Postfix to filter incoming mail through SpamAssassin, DNSBL checks, and custom rules before delivery to the mail store.

Application Email Relay

Enable SaaS applications to send transactional email through authenticated SMTP with automatic DKIM signing and outbound queue management.

Custom Address Routing

Implement qmail-style extended addressing (user-tag@domain.com) with a simple plugin to route tagged messages to base addresses in legacy systems.

Multi-Tenant Email Processing

Build per-customer email workflows with JavaScript plugins that parse, transform, and route messages based on domain-specific business logic.

Tech snapshot

JavaScript98%
Shell1%
HTML1%
Dockerfile1%
Perl1%

Tags

harakasmtpdkimspfnodejsmtajavascript

Frequently asked questions

Does Haraka replace Postfix or Exchange?

No. Haraka focuses on mail transfer and filtering, not storage or IMAP. It's designed to work alongside systems like Postfix, Exchange, or Dovecot, typically as a filtering gateway or relay.

What performance can I expect from Haraka?

Haraka can handle thousands of concurrent connections and deliver thousands of messages per second thanks to its asynchronous Node.js architecture, though actual performance depends on plugins and hardware.

How difficult is it to write custom plugins?

If you know JavaScript and Node.js, writing plugins is straightforward. Haraka's event-driven hooks let you intercept and modify mail flow at every stage with just a few lines of code.

What spam protection does Haraka offer?

Haraka includes plugins for SpamAssassin integration, DNS blocklists (DNSBL), SPF/DKIM validation, HELO checks, rate limiting, and many other anti-spam techniques available in the plugin ecosystem.

Can Haraka handle outbound email delivery?

Yes. Haraka includes a scalable outbound delivery engine that automatically queues messages marked for relaying (typically via authentication plugins) and manages delivery with retry logic.

Project at a glance

Active
Stars
5,549
Watchers
5,549
Forks
693
LicenseMIT
Repo age14 years old
Last commit2 weeks ago
Primary languageJavaScript

Last synced 12 hours ago