selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

billion-mail logo

Self-host billion-mail

v4.9

Open-source mail server with newsletter and email marketing

ReleaseOpen SourceAGPL-3.0
Updated11 months ago
LanguageGo
Setup difficultyAdvanced
Stars
16 383
CPU
1Core
RAM
1GB
Storage
20GB
Ports
25 (Postfix SMTP (unencrypted)), 465 (Postfix SMTPS (SSL/TLS)), 587 (Postfix mail submission (STARTTLS)), 143 (Dovecot IMAP), 993 (Dovecot IMAPS), 110 (Dovecot POP3), 995 (Dovecot POP3S), 80 (Web management console (HTTP) and free certificate verification), 443 (Web management console (HTTPS))
Requires
Dovecot, Postfix, PostgreSQL, Redis, Roundcube, Rspamd
Docker
billionmail/core
Install with Docker Compose
Adding a sending domain in the admin consoleConfiguring DNS records for a domainAdding an email marketing templateCreating an email marketing sending taskContacts and subscriber groupsSMTP relay services overview

What is billion-mail?

BillionMail is an open-source mail server and email marketing platform you run on your own Linux server. It bundles Postfix, Dovecot, Rspamd, PostgreSQL and Redis behind a web management console, so you can host sending domains and mailboxes, send newsletters, promotional or transactional email, and track campaign metrics such as delivery rate, open rate and click-through rate. Marketing tools include subscriber groups and tags, HTML and drag-and-drop templates with variable substitution and spintax, scheduled sending, unsubscribe links, and a sending API with API keys. When port 25 is blocked by your host, outbound mail can be forwarded through SMTP relay providers such as AWS SES or Mailgun. Roundcube webmail is included at /roundcube/, free SSL certificates are applied automatically, and fail2ban guards the console. Install it with the bundled shell script, with Docker Compose, or one-click from aaPanel; minimum hardware is 1 CPU core, 1 GB RAM and 20 GB disk, and only Linux (amd64/arm64) is currently supported. It is licensed under AGPLv3 with no monthly fees, though a paid manual deployment package is offered.

billion-mail alternatives

Should you self-host billion-mail?

billion-mail scores 71/100 on selfhost.directory (how scoring works) and ranks #5 of 16 in Mail Server. It has 16 383 GitHub stars, +485 in the last 30 days.

It shipped 2 stable releases in the past year. The latest, v4.9, came out on 11 December 2025. New versions land roughly every 3 weeks.

Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is Stalwart Mail Server (79/100, 15 976 stars). It scores higher overall, so compare the two before you pick. See billion-mail vs Stalwart Mail Server side by side.

Features

  • Built-in webmail (Roundcube)
  • Campaign analytics
  • Contact & subscriber lists
  • DNS setup guidance
  • Email marketing campaigns
  • Email Templates
  • Fail2ban protection
  • Free SSL Certificates
  • Mail server (SMTP / IMAP / POP3)
  • REST API
  • Scheduled sending
  • SMTP relay forwarding
  • Unlimited email sending
  • Unsubscribe links

billion-mail README

How to install billion-mail

Install billion-mail with Docker Compose

Docker and Docker Compose are installed.
Environment variables
ADMIN_USERNAME, ADMIN_PASSWORD, BILLIONMAIL_HOSTNAME, DBNAME, DBUSER, DBPASS, REDISPASS, SMTP_PORT, IMAP_PORT, HTTP_PORT, HTTPS_PORT, TZ, IPV4_NETWORK, FAIL2BAN_INIT
cd /opt && git clone https://github.com/aaPanel/BillionMail && cd BillionMail && cp env_init .env && docker compose up -d || docker-compose up -d

Please install Docker and docker-compose-plugin manually, and modify .env file. View the access address afterwards with: bash bm.sh default

How to configure billion-mail

  • ADMIN_USERNAMEDefault Billion Mail Username password
  • ADMIN_PASSWORD
  • BILLIONMAIL_HOSTNAMEBILLIONMAIL_HOSTNAME configuration, Postfix myhostname configuration
  • DBNAMEbillionmail
  • DBUSERbillionmail

billion-mail releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Mail Server

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…