• Stars
    star
    119
  • Rank 295,956 (Top 6 %)
  • Language
    Shell
  • Created about 6 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Docker image for sending outgoing mail

Supported tags

Quick reference

This image allows linked containers to send outgoing email. You can configure it to send email directly to recipients, or to act as a smart host that relays mail to an intermediate server (eg, GMail, SendGrid).

Usage

Basic SMTP server

In this example, linked containers can connect to hostname mail and port 25 to send outgoing email. The SMTP container sends email out directly.

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

Via Docker Compose:

version: '3'
services:
  mail:
    image: bytemark/smtp
    restart: always

SMTP smart host

In this example, linked containers can connect to hostname mail and port 25 to send outgoing email. The SMTP container acts as a smart host and relays mail to an intermediate server server (eg, GMail, SendGrid).

docker run --restart always --name mail \
    -e RELAY_HOST=smtp.example.com \
    -e RELAY_PORT=587 \
    -e [email protected] \
    -e RELAY_PASSWORD=secretpassword \
    -d bytemark/smtp

Via Docker Compose:

version: '3'
services:
  mail:
    image: bytemark/smtp
    restart: always
    environment:
      RELAY_HOST: smtp.example.com
      RELAY_PORT: 587
      RELAY_USERNAME: [email protected]
      RELAY_PASSWORD: secretpassword

Environment variables

All environment variables are optional. But if you specify a RELAY_HOST, then you'll want to also specify the port, username and password otherwise it's unlikely to work!

  • MAILNAME: Sets Exim's primary_hostname, which defaults to the hostname of the server.
  • RELAY_HOST: The remote SMTP server address to use.
  • RELAY_PORT: The remote SMTP server port to use.
  • RELAY_USERNAME: The username to authenticate with the remote SMTP server.
  • RELAY_PASSWORD: The password to authenticate with the remote SMTP server.
  • RELAY_NETS: Declare which networks can use the smart host, separated by semi-colons. By default, this is set to 10.0.0.0/8;172.16.0.0/12;192.168.0.0/16, which provides a thin layer of protection in case port 25 is accidentally exposed to the public internet (which would make your SMTP container an open relay).

More Repositories

1

docker-webdav

Docker image for running an Apache WebDAV server
Shell
350
star
2

pi-init2

Set up a Raspberry Pi and manage any of its configuration just from the /boot partition
Go
41
star
3

configs-gitlab-docker

Configuration files for setting up GitLab on Docker, with SMTP, automatic backups & updates
Shell
24
star
4

symbiosis

A hosting environment that works with you, not against you.
Ruby
20
star
5

configs-huginn-docker

Configuration files for setting up Huginn on Docker
15
star
6

configs-webdav-docker

Configuration files for setting up your own Omni Sync server on Docker
11
star
7

bigv-python

A Module for BigV which wraps the BigV CLI
Python
8
star
8

flexnbd-c

An NBD server written for Bytemark's bigv.io service. It was designed around use of fast Linux features such as sparse files, sendfile, splice and mmap. It can do live migration of storage. Proudly powering Bytemark's Cloud Servers
C
8
star
9

bgpfeeder

A BGPv4 daemon to distribute an infrequently-changing set of static routes
Ruby
7
star
10

configs-jenkins-docker

Configuration files for setting up Jenkins on Docker
6
star
11

configs-wordpress-docker

Configuration files for setting up WordPress on Docker and automatic updates
5
star
12

go-pdns

PowerDNS pipebackend implementation in Go
Go
4
star
13

configs-matomo-docker

Configuration files for setting up Matomo on Docker, with, SSL certificates, outgoing email and automatic updates
4
star
14

custodian

A distributed protocol tester.
Ruby
4
star
15

netlinkrb

Ruby interface to Linux Netlink
Ruby
3
star
16

configs-nextcloud-docker

Configuration files for setting up Nextcloud on Docker
3
star
17

byteback

A maintenance-free Linux backup solution, using btrfs snapshots
Ruby
3
star
18

mauvealert

Ruby
2
star
19

au

Debian package builder for ruby apps
Ruby
2
star
20

bmdash

Customisable dashboard software
CSS
1
star
21

bytemark-client

Command-line client for interacting with Bytemark services
Go
1
star