1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-12 10:45:38 +02:00
Insular email distribution - mail server as Docker images
Go to file
2016-04-24 16:27:17 +02:00
admin Add a basic service status page 2016-04-20 22:37:17 +02:00
amavis Disable filter management in Roundcube 2016-04-20 21:19:16 +02:00
doc Add an architecture diagram 2016-02-24 09:47:04 +01:00
dovecot Build the dovecot container from edge alpine 2016-04-24 16:27:17 +02:00
nginx Switch to the new networking API 2016-04-20 21:17:43 +02:00
postfix Switch to the new networking API 2016-04-20 21:17:43 +02:00
roundcube Disable filter management in Roundcube 2016-04-20 21:19:16 +02:00
.gitignore Add virtualenv folders to .gitignore 2016-04-24 15:52:57 +02:00
docker-compose.yml Switch to the new networking API 2016-04-20 21:17:43 +02:00
freeposte.env Switch to the new networking API 2016-04-20 21:17:43 +02:00
LICENSE Add a license file 2016-04-12 20:09:40 +02:00
README.md Add instructions about setting up the environment 2016-04-12 21:27:35 +02:00
start.sh Use exec to start supervisor 2016-02-21 19:48:26 +01:00

Freeposte.io

Simple yet functional and full-featured mail server as a set of Docker images. The idea behing Freeposte.io is identical to motivations that led to poste.io: providing a simple and maintainable mail server that is painless to manage and does not require more resources than necessary.

People from poste.io did an amazing job at accomplishing this ; any company looking for a serious yet simple mail server with professional support should turn to them.

This project is meant for free software supporters and hackers to reach the same level of functionality and still be able to host a complete mail server at little cost while running only FOSS, applying the KISS principle and being able to fine-tune some details if needed.

General architecture

The mail infrastructure is based on a standard MTA-LDA pattern :

  • Postfix for incoming and outgoing emails ;
  • Amavis as a filtering interface before delivery (with SpamaAssassin and ClamAV) ;
  • Dovecot as a delivery agent and reading (IMAP) server ;
  • Roundcube (or any Webmail) as a user-friendly Web client ;
  • Freeposte (Flask application) as an administration interface.

Architecture

Running a mail server

Please note that this project is still in a very early stage. Do not use for production!

The mail server runs as a set of Docker containers. These containers are managed through a docker-compose.yml configuration file that requires Docker Compose to run.

First, follow instructions at https://docs.docker.com to setup Docker and Docker Compose properly for your system. Then download the main configuration files:

wget https://raw.githubusercontent.com/kaiyou/freeposte.io/master/docker-compose.yml
wget https://raw.githubusercontent.com/kaiyou/freeposte.io/master/freeposte.env

The docker-compose.yml file contains instructions about which containers to run and how they will interact. freeposte.env is the main configuration file. You must read it and provide proper configuration before running the server.

You will also need to create a data directory. Freeposte will use /data as a sane default:

mkdir -p /data

Otherwise, simply edit the docker-compose.yml to match your requirements. Finally, you can run your mail server:

docker-compose up -d

Monitoring the mail server

Logs are managed by Docker directly. You can easily read your logs using :

docker-compose logs

Docker is able to forward logs to multiple log engines. Read the following documentation or details: https://docs.docker.com/engine/admin/logging/overview/.

Building from source

You can simply build all the containers from source using the docker-compose.yml. First clone the Git repository:

git clone https://github.com/kaiyou/freeposte.io.git

Then build all the images :

docker-compose build

Development environment

The administration Web interface requires a proper dev environment that can easily be setup using virtualenv (make sure you are using Python 3) :

cd admin
virtualenv .
source bin/activate
pip install -r requirements.txt

You can then export the path to the development database:

export SQLALCHEMY_DATABASE_URI=sqlite:///path/to/dev.db

And finally run the server with debug enabled:

python run.py