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.

GitHub
docker-smtp logo

Self-host docker-smtp

Docker SMTP server for outgoing mail relay

ReleaseOpen Source
Updated8 years ago
LanguageShell
Setup difficultyEasy
Stars
145
Port
25 (SMTP)
Docker
bytemark/smtp
Install with Docker

What is docker-smtp?

docker-smtp is a minimal Docker image maintained by Bytemark Hosting that provides an Exim4 SMTP server for containerized applications to send outgoing email. It can operate in two modes: as a direct delivery SMTP server sending mail straight to recipients, or as a smart host that authenticates and relays through an external SMTP provider such as Gmail or SendGrid. The image exposes port 25 and is configured via environment variables including MAILNAME, RELAY_HOST, RELAY_PORT, RELAY_USERNAME, RELAY_PASSWORD, and RELAY_NETS. It runs on any architecture with the Debian exim4-daemon-light package. The project has not been updated since 2018 and uses Debian Stretch as its base.

Should you self-host docker-smtp?

docker-smtp scores 38/100 on selfhost.directory (how scoring works) and ranks #88 of 106 in Email. It has 145 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is written mostly in Shell.

Its closest alternative on selfhost.directory is Listmonk (80/100, 24 017 stars). It scores higher overall, so compare the two before you pick. See docker-smtp vs Listmonk side by side.

Features

  • Direct delivery
  • Network access control
  • Smart host relay
  • SMTP Server

docker-smtp README

How to install docker-smtp

Install docker-smtp with Docker

Environment variables
MAILNAME, RELAY_HOST, RELAY_PORT, RELAY_USERNAME, RELAY_PASSWORD, RELAY_NETS

docker run --restart always --name mail -d bytemark/smtp

Basic SMTP server sending mail directly.

How to configure docker-smtp

  • MAILNAMESets Exim's primary_hostname, which defaults to the hostname of the server.

    Sets Exim's primary_hostname, which defaults to the hostname of the server.

  • RELAY_HOSTThe remote SMTP server address to use for smart host relay.

    The remote SMTP server address to use for smart host relay.

  • RELAY_NETS10.0.0.0/8;172.16.0.0/12;192.168.0.0/16Declare which networks can use the smart host, separated by semi-colons. Defaults to 10.0.0.0/8;172.16.0.0/12;192.168.0.0/16.

    Declare which networks can use the smart host, separated by semi-colons. Defaults to 10.0.0.0/8;172.16.0.0/12;192.168.0.0/16.

  • RELAY_PASSWORDThe password to authenticate with the remote SMTP server.

    The password to authenticate with the remote SMTP server.

  • RELAY_PORTThe remote SMTP server port to use for smart host relay.

    The remote SMTP server port to use for smart host relay.

  • RELAY_USERNAMEThe username to authenticate with the remote SMTP server.

    The username to authenticate with the remote SMTP server.

More in Email

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…