pigeonhole plugin with ldap support

This commit is contained in:
Sebastian Hugentobler 2016-08-24 13:04:00 +02:00
parent c982b90c7b
commit ea17d13960
4 changed files with 25 additions and 2 deletions

View File

@ -1,6 +1,14 @@
FROM thallian/confd-env:latest
RUN apk add --no-cache dovecot dovecot-ldap dovecot-pigeonhole-plugin ssmtp
RUN apk add --no-cache dovecot dovecot-ldap ssmtp g++ openldap-dev dovecot-dev make
RUN mkdir /tmp/pigeonhole
RUN wget -qO- http://pigeonhole.dovecot.org/releases/2.2/dovecot-2.2-pigeonhole-0.4.15.tar.gz | tar -xz -C /tmp/pigeonhole --strip 1
WORKDIR /tmp/pigeonhole
RUN ./configure --with-ldap=yes --with-dovecot=/usr/lib/dovecot
RUN make && make install
RUN apk del g++ openldap-dev dovecot-dev make
RUN addgroup -g 1111 vmail
RUN adduser -u 1111 -h /var/lib/vmail -D -G vmail vmail

View File

@ -0,0 +1,3 @@
[template]
src = "sieve-ldap.conf.tmpl"
dest = "/etc/dovecot/sieve-ldap.conf"

View File

@ -3,6 +3,6 @@ protocol sieve {
}
plugin {
sieve = file:~/sieve;active=~/.dovecot.sieve
sieve = ldap:/etc/dovecot/sieve-ldap.conf;bindir=~/.sieve-bin/
sieve_after = /var/lib/vmail/sieve-after/
}

View File

@ -0,0 +1,12 @@
hosts = {{getenv "LDAPSIEVEHOST"}}
dn = {{getenv "LDAPBINDDN"}}
dnpass = {{getenv "LDAPBINDPASSWORD"}}
sasl_bind = no
tls = {{getenv "LDAPUSETLS"}}
ldap_version = 3
base = {{getenv "LDAPBASEDN"}}
deref = never
scope = subtree
sieve_ldap_filter = {{getenv "LDAPUSERFILTER"}}
sieve_ldap_script_attr = {{getenv "LDAPSIEVEATTRIBUTE"}}
sieve_ldap_mod_attr = modifyTimestamp