Changed clone URL in README.md
Changed clone URL to https://git.unixpeople.org/systemchaos.org/docker-qmail.git
|4 months ago|
|assets||4 years ago|
|Dockerfile||4 years ago|
|README.md||4 months ago|
Dockerfile to build a container image with qmail, vpopmail, ezmlm, qmailadmin and dovecot
This container will run supervisord and start up
Take note: qmail (port 25) should NEVER be open to the public internet, it’s outdated and this setup won’t protect against spam. I recommend using postfix and redirect mails for qmail-based domains to this server.
I’m not planning on maintaining an docker image, but I wanted to give this to the community. So you’ll have to build it yourself, no worries, it’s all automated
git clone https://git.unixpeople.org/systemchaos.org/docker-qmail.git cd docker-qmail docker build -t qmail .
This will take a couple of minutes since it will compile everything (5 up to 30 minutes depending on your hardware).
If you want to be able to run vpopmail commands outside the container, I’ve added some scripts that will help to install them:
cd assets/scripts chmod +x install.sh ./install.sh
now you can use commands like
You can launch the image using the docker command line,
docker run --name='qmail' -it --rm \ -p 10080:80 \ -p 20025:25 -p 110:110 -p 993:993 -p 143:143 -p 995:995 \ -v /home/vpopmail/domains:/home/vpopmail/domains \ qmail
Point your browser to
You should now have the qmailadmin application up and ready for testing. If you want to use this image in production the please read on.
if you don’t want to lose your mail when the docker container is stopped/deleted. To avoid losing any data, you should mount a volume at,
For debugging and maintenance purposes you may want access the containers shell. If you are using docker version
1.3.0 or higher you can access a running containers shell using
docker exec command.
docker exec -it qmail bash
If you are using an older version of docker, you can use the nsenter linux tool (part of the util-linux package) to access the container shell.
Some linux distros (e.g. ubuntu) use older versions of the util-linux which do not include the
nsenter tool. To get around this @jpetazzo has created a nice docker image that allows you to install the
nsenter utility and a helper script named
docker-enter on these distros.
nsenter execute the following command on your host,
docker run --rm -v /usr/local/bin:/target jpetazzo/nsenter
Now you can access the container shell using the command
sudo docker-enter qmail
For more information refer https://github.com/jpetazzo/nsenter