Skip to content

padcmoi/simply-docker-sql-mailserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simply a full docker mail server (All in One) (MySQL DB)

DESCRIPTION

Short

Simply a complete mail server running on a single docker container with as few configuration as possible, quick and easy to set up, fully managed in-house with a MySQL database unreachable from the outside, manageable externally via a nest.js API and a front-end application.

  • Readme installation (in progress)
  • This project unfinished as long as the PhpMyAdmin is the only way to manage it (for the moment)

Concept and why

The inspiration for this project came from the Docker Mailserver Project, I started from scratch and wanted to create the same project except with full MySQL email management and simple, easy-to-use configuration for everyone.

I've always wanted to create a complete mail server under Linux with custom administration that is often complex to create, which is why I'd like to take on the challenge of being able to deploy it easily with a docker container that includes all of this and then offer it as an open-source project.

Through this project I'd like to apply what I've learned in my lessons on the DYMA platform (see my objective diagram), among the DYMA courses I'd like to apply:

  • HTML & CSS
  • Tailwind 3
  • Linux & Bash
  • Docker
  • Node
  • Typescript
  • React (I'd like try that with with next.js)
  • React native (maybe, with an app for iOS and Android smartphones)
  • NestJS

Included services, checked for implemented

  • Postfix with SASL Dovecot-LMTP authentication
  • Dovecot with SASL, IMAPS only
    • Quota enabled managed by MySQL database
    • Sieve support with basic configuration (see docker/conf/sieve/)
  • Rspamd
    • auto bayesian HAM & SPAM
    • Web interface on port 4001 with full spam module configuration
    • filtering virus with clamav dedicated module
  • Amavis
  • ClamAV with automatic updates
  • OpenDKIM
  • OpenDMARC
  • Fail2ban
  • Postscreen
  • Roundcube
  • SSL certificate to be updated on host, letsencrypt compatible, but server doesn't have port 80 to update itself
  • MySQL database support
  • API Nest.js with ACL support for multiple domains, recipients and business plan
  • React front application

FAQ

Professional use

There's no reason why this project can't be used by a company, since all the packages used in this project have already been used for many years by professional mail servers. The Docker container and all its contents can be updated by personal or tierce contributions or by forking the initial project. Contributions from other developers will allow me to better myself both personally and professionally, that's my goal. However, before using this project, please give me time to finalize it completely.

Database selection

In the documentation dovecot, postfix, opendmarc etc ..., MySQL plugins seem to be the most optimized. Postgresql seems optimized for dovecot and postfix but not opendmarc. It's possible to use mongodb via third-party archives, I chose to this project MySQL for the advantage of updates and vulnerabilities, which would be fixed more quickly. Later, I think it would be possible to choose in the environment which type of database by altering the docker configuration files and the bash sed command, it's quite possible and it would be experimental. I don't think I'd use SQLite because it's limited in terms of writing performance, but PostgreSQL is, and why not mongoDB?

Choice of linux distribution

Packages are installed with aptitude, so the distribution can be chosen between debian, ubuntu, ...

I've encountered bugs with some distributions, actually I've tested with 2 distributions

  • debian 11 (bullseye)
    • OK, All services work except clamav-daemon, but antivirus works on emails
  • debian 12 (bookworm)
    • Issues with dovecot quota domain, amavis

Requirements & installation

 Requirements

The docker container runs on a VPS 2vcore with 4 GB memory, which seems to be sufficient for working with 10 recipients and 2 domains. Memory consumption increases with the antivirus, so it depends on the number of recipients and will have to be adjusted if necessary.

 Installation

There is a document dedicated to this by clicking here

Tests

At the moment, I don't know how I could set up unit tests, so I'm curious and looking for information. Unit testing on a docker container, an interesting topic, I wonder if these tests should be performed from the outside or the inside Example with docker exec -it simply-mailserver bash

License

MIT License

Authors

Julien Jean (main contributor)

About

Simply a docker mail server managed by MySQL (in progress)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published