Giter Site home page Giter Site logo

metamic / dovecot-ldap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from teid/dovecot-ldap

0.0 0.0 0.0 41 KB

A Docker image running Dovecot on Debian with LDAP backend

Home Page: https://hub.docker.com/r/teid/dovecot-ldap

License: MIT License

Shell 81.62% Dockerfile 18.38%

dovecot-ldap's Introduction

Docker dovecot-ldap

A Docker image running Dovecot on Debian stable ("jessie" at the moment) with the following modules:

  • LMTP
  • LDAP backend (with bind auth)

This image provide mailbox managment services. You can access those mailboxes using IMAP or POP protocols. Mails might be delivered using LMTP protocol.

Every mailbox access required an authenticated user. The user database is provided by an external LDAP service.

Interfaces

The image exposes several TCP ports. The IMAP and POP ports used to access to the mailboxes. The LMTP port to ship messages to the mailboxes:

  • 143: IMAP port
  • 993: IMAPs port
  • 110: POP port
  • 995: POPs port
  • 24: LMTP port

Data persistence

The image exposes three directories:

  • /var/mail: Actual mailboxes are stored in this volume. You should implement some backup strategies on those.
  • /etc/ssl/localcerts: Service certificate and keys are stored in this volume. Dovecot is expecting the following PEM files: /etc/ssl/localcerts/imap.cert.pem and /etc/ssl/localcerts/imap.key.pem. If none are provided, the startup script will generate new keys and self-signed certificate.
  • /etc/dovecot: If you want to override the default configurations, you can use this volume to make Dovecot use you files.

Usage

The most simple use would be to start the application like so :

docker run -d 
-p 143:143
--link ldap-container:ldap
-e LDAP_USER_FIELD="uid"
-e LDAP_BASE="ou=users,dc=yourdomain,dc=com"
-e LDAP_BIND_DN="cn=dovecot,dc=example,dc=com"
-e LDAP_BIND_DNPASS="password"
teid/dovecot-ldap

However, you should use your own certificate and a data-only container to store the mailboxes

docker run -d
-p 993:993
--link ldap-container:ldap
--volumes-from imap-certs
--volumes-from imap-data
-e LDAP_USER_FIELD="uid"
-e LDAP_BASE="ou=users,dc=yourdomain,dc=com"
-e LDAP_BIND_DN="cn=dovecot,dc=example,dc=com"
-e LDAP_BIND_DNPASS="password"
teid/dovecot-ldap

The following environment variables allows you to override some LDAP configurations:

  • LDAP_BASE: The base dn of the LDAP users
  • LDAP_BIND_DN (required): The bind dn of the LDAP user
  • LDAP_BIND_DNPASS (required): The bind dn password of the LDAP user
  • LDAP_USER_FIELD: The field name of your LDAP users used as username field
  • SSL_KEY_PATH: The SSL private key path
  • SSL_CERT_PATH: The SSL certificate path

Note: If you are using a custom configuration volume with this variables, your configuration files might be altered. You should not use both features.

The user are authenticated thanks to the user part of the address (user@domain). So the LDAP_USER_FIELD should contains the usernames without the address extensions. The LDAP auth will use the bind method

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.