fauria/mailman
Complete GNU Mailman suite, including Exim MTA, Apache webserver and DKIM support.
1.7K
This Docker container ships a full GNU Mailman solution based on Ubuntu 16.04. It allows the deployment of a working mailing list service with a single command line.
It does not depend on any other service, everything needed is provided by the Docker image. The system is automatically initialised with options supplied through environment variables defined at run time.
The following components are included:
You can download the image using the following command:
docker pull fauria/mailman
The image should be launched specifying a hostname, that is, using -h lists.example.com
docker
modifier.
This image uses several environment variables to define different values to be used at run time:
URL_FQDN
lists.example.com
EMAIL_FQDN
.EMAIL_FQDN
lists.example.com
-h
modifier, and usually will be the same as URL_FQDN
as well.LIST_ADMIN
admin@lists.example.com
mailman
mailing list.MASTER_PASSWORD
example
mailman
mailing list.LIST_LANGUAGE_CODE
en
en
.LIST_LANGUAGE_NAME
English
English
, but adds one more language to be used on the lists.DEBUG_CONTAINER
false
false
, true
-e DEBUG_CONTAINER=true
.The image exposes ports 80
and 25
, corresponding to Apache and Exim respectively.
Also exports six volumes:
/var/log/mailman
: Logs for Mailman./var/log/exim4
: Logs for Exim MTA./var/log/apache2
: Logs for Apache webserver./var/lib/mailman/archives
: Mailman mailing lists archives./var/lib/mailman/lists
: Mailman mailing lists./etc/exim4/tls.d
: Exim DKIM keys. Expected to contain private.pem
and public.pem
files. If omitted, a new pair of keys will be created on runtime.Use an specific subdomain for your mailing list, such as lists.example.com
.
Make sure you can add TXT records in your domain's DNS master zone.
In addition to DKIM, consider adding an SPF to set your server as the only one originating email for the list domain.
If you want to use your own pair of RSA keys for DKIM, create a diretory in the host containing two files named private.pem
and public.pem
respectively. Then run the container attaching that directory to /etc/exim4/tls.d
, i.e. -v /my/local/dir/keys:/etc/exim4/tls.d
.
docker run -i -t --rm -h lists.example.com -e DEBUG_CONTAINER=true fauria/mailman
whatever.example.com
without exported volumes: docker run -d --restart=always -h whatever.example.com -e URL_FQDN=whatever.example.com -e EMAIL_FQDN=whatever.example.com -e MASTER_PASSWORD=SecretPassword -e LIST_ADMIN=whoever@example.com -p 49780:80 -p 25:25 fauria/mailman
docker run -d --restart=always --name my-mailing-list -h whatever.example.com -e URL_FQDN=whatever.example.com -e EMAIL_FQDN=whatever.example.com -e MASTER_PASSWORD=SecretPassword -e LIST_LANGUAGE_CODE=es -e LIST_LANGUAGE_NAME=Spanish -e LIST_ADMIN=whoever@example.com -e DEBUG_CONTAINER=false -p 49780:80 -p 25:25 -v /my/local/dir/archives:/var/lib/mailman/archives -v /my/local/dir/lists:/var/lib/mailman/lists -v /my/local/dir/keys:/etc/exim4/tls.d -v /my/local/dir/log/apache2:/var/log/apache2 -v /my/local/dir/log/exim4:/var/log/exim4 -v /my/local/dir/log/mailman:/var/log/mailman fauria/mailman
In this case, we are using directories outside the container to persist data. The following commands were run in the host system to initialize the shared volumes:
mkdir -p /my/local/dir/archives/{private,public}
mkdir -p /my/local/dir/lists
chown -R 0:38 /my/local/dir/{archives,lists}
chown 33 /my/local/dir/archives/private
mkdir -p /my/local/dir/log/{apache2,exim4,mailman}
chown 0:4 /my/local/dir/log/apache2
chown 105:4 /my/local/dir/log/exim4
chown 0:38 /my/local/dir/log/mailman
This will create the host directories and set their permissions according to the following IDs:
uid=33(www-data) gid=33(www-data) groups=33(www-data)
uid=38(list) gid=38(list) groups=38(list)
uid=105(Debian-exim) gid=108(Debian-exim) groups=108(Debian-exim)
docker pull fauria/mailman