Home

Awesome

<p align="center"><a href="https://github.com/crazy-max/docker-msmtpd" target="_blank"><img height="128" src="https://raw.githubusercontent.com/crazy-max/docker-msmtpd/master/.github/docker-msmtpd.jpg"></a></p> <p align="center"> <a href="https://hub.docker.com/r/crazymax/msmtpd/tags?page=1&ordering=last_updated"><img src="https://img.shields.io/github/v/tag/crazy-max/docker-msmtpd?label=version&style=flat-square" alt="Latest Version"></a> <a href="https://github.com/crazy-max/docker-msmtpd/actions?workflow=build"><img src="https://img.shields.io/github/actions/workflow/status/crazy-max/docker-msmtpd/build.yml?branch=master&label=build&logo=github&style=flat-square" alt="Build Status"></a> <a href="https://hub.docker.com/r/crazymax/msmtpd/"><img src="https://img.shields.io/docker/stars/crazymax/msmtpd.svg?style=flat-square&logo=docker" alt="Docker Stars"></a> <a href="https://hub.docker.com/r/crazymax/msmtpd/"><img src="https://img.shields.io/docker/pulls/crazymax/msmtpd.svg?style=flat-square&logo=docker" alt="Docker Pulls"></a> <br /><a href="https://github.com/sponsors/crazy-max"><img src="https://img.shields.io/badge/sponsor-crazy--max-181717.svg?logo=github&style=flat-square" alt="Become a sponsor"></a> <a href="https://www.paypal.me/crazyws"><img src="https://img.shields.io/badge/donate-paypal-00457c.svg?logo=paypal&style=flat-square" alt="Donate Paypal"></a> </p>

About

Lightweight SMTP relay using msmtpd as a Docker image.

[!TIP] Want to be notified of new releases? Check out 🔔 Diun (Docker Image Update Notifier) project!


Features

Build locally

git clone https://github.com/crazy-max/docker-msmtpd.git
cd docker-msmtpd

# Build image and output to docker (default)
docker buildx bake

# Build multi-platform image
docker buildx bake image-all

Image

RegistryImage
Docker Hubcrazymax/msmtpd
GitHub Container Registryghcr.io/crazy-max/msmtpd

Following platforms for this image are available:

$ docker buildx imagetools inspect crazymax/msmtpd --format "{{json .Manifest}}" | \
  jq -r '.manifests[] | select(.platform.os != null and .platform.os != "unknown") | .platform | "\(.os)/\(.architecture)\(if .variant then "/" + .variant else "" end)"'

linux/386
linux/amd64
linux/arm/v6
linux/arm/v7
linux/arm64
linux/ppc64le
linux/s390x

Environment variables

💡 SMTP_USER_FILE and SMTP_PASSWORD_FILE can be used to fill in the value from a file, especially for Docker's secrets feature.

💡 More info: https://marlam.de/msmtp/msmtp.html

Ports

Usage

Docker Compose

Docker compose is the recommended way to run this image. You can use the following docker compose template, then run the container:

docker compose up -d
docker compose logs -f

Kubernetes

To install on a Kubernetes cluster, you can use the following kubernetes deployment template, then create the deployment:

kubectl apply -f deployment.yaml

Command line

You can also use the following minimal command:

$ docker run -d -p 2500:2500 --name msmtpd \
  -e "SMTP_HOST=smtp.example.com" \
  crazymax/msmtpd

Upgrade

Recreate the container whenever I push an update:

docker compose pull
docker compose up -d

Contributing

Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. You can also support this project by becoming a sponsor on GitHub or by making a PayPal donation to ensure this journey continues indefinitely!

Thanks again for your support, it is much appreciated! :pray:

License

MIT. See LICENSE for more details.