Updated mailman2 image based on fauria/mailman. Ubuntu 20.04 - Mailman 2.1.29.
371
https://gitlab.mpcdf.mpg.de/adrum/docker-mailman2
Build on Apple M2 with: docker buildx build --platform linux/amd64 -t drummerroma/mailman2 .
based on fauria/mailman All credits goes to him.
This Docker container ships a full GNU Mailman solution based on Ubuntu 20.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 drummerroma/mailman2
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_FQDNlists.example.comEMAIL_FQDN.EMAIL_FQDNlists.example.com-h modifier, and usually will be the same as URL_FQDN as well.LIST_ADMIN[email protected]mailman mailing list.MASTER_PASSWORDexamplemailman mailing list.LIST_LANGUAGE_CODEenen.LIST_LANGUAGE_NAMEEnglishEnglish, but adds one more language to be used on the lists.DEBUG_CONTAINERfalsefalse, 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.key and public.key 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.key and public.key 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 drummerroma/mailman2
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 [email protected] -p 49780:80 -p 25:25 fdrummerroma/mailman2
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=de -e LIST_LANGUAGE_NAME=German -e [email protected] -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 drummerroma/mailman2
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:
sudo mkdir -p /srv/mailman/data/archives/{private,public}
sudo mkdir -p /srv/mailman/data/lists
sudo mkdir -p /srv/mailman/data/log/{apache2,exim4,mailman}
sudo chown -R :38 /srv/mailman/data/{archives,lists}
sudo chown :33 /srv/mailman/data/archives/private
sudo chown :4 /srv/mailman/data/log/apache2
sudo chown 105:4 /srv/mailman/data/log/exim4
sudo chown :38 /srv/mailman/data/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=101(Debian-exim) gid=102(Debian-exim) groups=102(Debian-exim)
Restart your container after the permissions has been set on the host.
Content type
Image
Digest
sha256:3ae95441b…
Size
124.9 MB
Last updated
over 3 years ago
docker pull drummerroma/mailman2