Coder Social home page Coder Social logo

docker-qmail's Introduction

Table of Contents

Introduction

Dockerfile to build a container image with qmail, vpopmail, ezmlm, qmailadmin and dovecot

This container will run supervisord and start up

  • qmail-send and a qmail tcp server (for smtp)
  • nginx for qmailadmin
  • dovecot for imap and pop3

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.

Version

Current versions:

  • qmail: 1.0.6
  • vpopmail: 5.4.33
  • ezmlm: github master version of https://github.com/bruceg/ezmlm-idx
  • autorespond: 2.0.5
  • qmailadmin: 1.2.16 using ubuntu nginx
  • dovecot: current ubuntu version custom rebuild: 2.2.9-1ubuntu2.1

Installation

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://github.com/Maescool/docker-qmail
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 vadddomain and vuserinfo etc..

Quick Start

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 http://localhost:10080

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.

Configuration

Data Store

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,

  • /home/vpopmail/domains
  • /var/qmail/control
  • /var/qmail/users

Maintenance

Shell Access

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.

To install 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

References

http://www.qmail.org/netqmail/ http://www.lifewithqmail.org/ http://www.inter7.com/software/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.