Created
          June 4, 2020 16:28 
        
      - 
      
- 
        Save cmouse/c49a57af271aab7b4ec4a34c67cbe095 to your computer and use it in GitHub Desktop. 
Revisions
- 
        cmouse created this gist Jun 4, 2020 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ ## You should mount /etc/dovecot if you want to ## manage this file mail_home=/srv/mail/%Lu mail_location=sdbox:~/Mail mail_uid=1000 mail_gid=1000 protocols = imap pop3 submission sieve lmtp first_valid_uid = 1000 last_valid_uid = 1000 passdb { driver = static args = password=pass } ssl=yes ssl_cert=<cert.pem ssl_key=<key.pem namespace { inbox = yes separator = / } service lmtp { inet_listener { port = 24 } } listen = * log_path=/dev/stdout info_log_path=/dev/stdout debug_log_path=/dev/stdout This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ deb http://repo.dovecot.org/ce-2.3.10.1/debian/buster buster main This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ FROM debian:10 ADD dovecot.gpg /etc/apt/trusted.gpg.d ADD dovecot.list /etc/apt/sources.list.d ENV TINI_VERSION v0.18.0 ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini ENV container docker ENV LC_ALL C ENV DEBIAN_FRONTEND noninteractive RUN apt-get -y update && apt-get -y install \ dovecot-core \ dovecot-coi \ dovecot-gssapi \ dovecot-imapd \ dovecot-ldap \ dovecot-lmtpd \ dovecot-lua \ dovecot-managesieved \ dovecot-mysql \ dovecot-pgsql \ dovecot-pop3d \ dovecot-sieve \ dovecot-solr \ dovecot-sqlite \ dovecot-submissiond \ ca-certificates \ ssl-cert && \ groupadd -g 1000 vmail && \ useradd -u 1000 -g 1000 vmail -d /srv/vmail && \ passwd -l vmail && \ rm -rf /etc/dovecot && \ chmod +x /sbin/tini && \ mkdir /srv/mail && \ chown vmail:vmail /srv/mail && \ make-ssl-cert generate-default-snakeoil && \ mkdir /etc/dovecot && \ ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/dovecot/cert.pem && \ ln -s /etc/ssl/private/ssl-cert-snakeoil.key /etc/dovecot/key.pem ADD dovecot.conf /etc/dovecot/dovecot.conf VOLUME ["/etc/dovecot", "/srv/mail"] ENTRYPOINT ["/sbin/tini", "--"] CMD ["/usr/sbin/dovecot", "-F"]