Code Monkey home page Code Monkey logo

dockmail's Introduction

dockmail

A simple mail server in a box for use in different projects.

Based on https://github.com/lava/dockermail and https://github.com/mingzeke/dockermail

A secure, minimal-configuration mail server in a docker container. This repository is tailored to small private servers or projects, where you own a domain and want to host your own mail.

This container uses postfix as MTA and dovecot as IMAP server. All incoming mail to your domains is accepted. For outgoing mail, only authenticated (logged in with username and password) clients can send messages via STARTTLS.

  • mailserver: The SMTP and IMAP server. This container uses postfix as MTA and dovecot as IMAP server. All incoming mail to your own domains is accepted. For outgoing mail, only authenticated (logged in with username and password) clients can send messages via STARTTLS on port 587. In theory it works with all mail clients, but it was only tested with Thunderbird.

  • mailpile: An early-alpha but promising webmail interface. By default, the web interface will bind to localhost:33411 - this container will be done later

Setup

Create 2 folders: one for mail configuration (/opt/dockermail/settings), another for mail storage (/opt/dockermail/vmail).

  1. Add all domains you want to receive mail for to the file /opt/dockermail/settings/domains, like this:

     example.org
     example.net
    
  2. Add user aliases to the file /opt/dockermail/settings/aliases, like

    An IMAP mail account is created for each entry on the right hand side. Every mail sent to one of the addresses in the left column will be delivered to the corresponding account in the right column.

  3. Add user passwords to the file /opt/dockermail/settings/passwords like this

     [email protected]:{PLAIN}password123
     [email protected]:{SHA256-CRYPT}$5$ojXGqoxOAygN91er$VQD/8dDyCYOaLl2yLJlRFXgl.NSrB3seZGXBRMdZAr6
    

    To get the hash values, you can either install dovecot locally or use docker exec -it dockermail bash to attach to the running container (step 7) and run doveadm pw -s <scheme-name> inside.

  4. Create /opt/dockermail/settings/myhostname with the fully qualified domain of your server.

  5. Build container

     build.sh
    
  6. Run container and map ports 25 and 143 from the host to the container. To store your mail outside the container, map /opt/dockermail/vmail/ to a directory on your host. (This is recommended, otherwise you have to remember to backup your mail when you want to restart the container)

    docker run -name dockermail -d -p 25:25 -p 587:587 -p 143:143 -v /opt/dockermail/settings:/mail_settings -v /opt/dockermail/vmail:/vmail dockermail_made_special/2.11.1

dockmail's People

Stargazers

Bogdan U avatar

Watchers

Holger Berndt avatar

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.