Skip to content

Docker MailServer - Postfix + Dovecot + MySQL

Notifications You must be signed in to change notification settings

lyz7805/mailserver

Repository files navigation

Docker MailServer - Postfix + Dovecot + MySQL + OpenDKIM + SPF

Simple mail server with Postfix and Dovecot in docker, the server uses MySQL to manage all your email domains and users.

Reuqire

  • Docker - to run the application
  • MySQL - to manage the email domains and users, you can create db by run the DBinit.sql file

Build

sh -c ./build.sh

Usage

  1. Pull the image
    docker pull 94love1/mailserver
  2. Create envionment file
    cp .env.template .env
  3. Set your configuration
    • save your SSL certificates .key and .crt into /path/to/certs dir
    • save your DKIM domain key file mail.private into /path/to/key dir
    • set yourt environment vars
  4. Docker run
    docker run -d \
        --name mailserver \
        --env-file .env \
        -p 25:25 \
        -p 465:465 \
        -p 993:993 \
        -p 995:995 \
        -v /path/to/certs:/etc/ssl/mail \
        -v /path/to/key/mail.private:/var/db/dkim/mail.private \
        -v mailserver-mail:/var/mail \
        94love1/mailserver

Reference

About

Docker MailServer - Postfix + Dovecot + MySQL

Resources

Stars

Watchers

Forks

Packages

No packages published