E-MailRelay

Purpose:: Email SMTP transfer agent and proxy server
Type:: #tool/admin

Website:: https://sourceforge.net/projects/emailrelay/
Docs:: https://emailrelay.sourceforge.net/
Source Code:: https://sourceforge.net/p/emailrelay/git/

Description

E-MailRelay is an e-mail store-and-forward message transfer agent and proxy server. It runs on Unix-like operating systems (including Linux and Mac OS X), and on Windows.

E-MailRelay does three things: it stores any incoming e-mail messages that it receives, it forwards e-mail messages on to another remote e-mail server, and it serves up stored e-mail messages to local e-mail reader programs. More technically, it acts as a SMTP storage daemon, a SMTP forwarding agent, and a POP3 server.

Whenever an e-mail message is received it can be passed through a user-defined program, such as a spam filter, which can drop, re-address or edit messages as they pass through.

Docker

Docker image by dogukancagatay

GitHub - dogukancagatay/docker-emailrelay: Docker image for emailrelay

Image: https://hub.docker.com/r/dcagatay/emailrelay

Problem: image available only for 64-bit, but I need a 32-bit version to be able to run it on a Raspberry PI 2.

Own build for armv7 (32-bit)

git clone git@github.com:dogukancagatay/docker-emailrelay.git
docker buildx build --platform linux/arm/v7 -t dvdk/emailrelay-armv7:2.4 -t dvdk/emailrelay-armv7:latest --push .

DockerHub: https://hub.docker.com/r/dvdk/emailrelay-armv7

Run as POP3 server

pop.auth:

server plain <username> <password>

docker-compose.yml:

version: "3"
services:
  emailrelay:
    image: dvdk/emailrelay-armv7:latest
    command: --as-server --pop --pop-auth=/pop.auth
    ports:
      - "25:25"
      - "110:110"
    volumes:
      - ./pop.auth:/pop.auth
      - ./spool:/var/spool/emailrelay
    restart: unless-stopped

Start:

docker compose up -d

Stop:

docker compose down