dovecot: add managesieve support

This commit is contained in:
hasufell 2015-10-01 15:57:36 +02:00
parent cac2ad2b7f
commit ebc134fb13
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
3 changed files with 91 additions and 11 deletions

View File

@ -2,17 +2,20 @@ FROM hasufell/gentoo-amd64-paludis:latest
MAINTAINER Julian Ospald "hasufell@posteo.de" MAINTAINER Julian Ospald "hasufell@posteo.de"
# check these with "cave show <package-name>" # check these with "cave show <package-name>"
RUN echo -e "*/* acl bash-completion ipv6 kmod openrc pcre readline unicode\ RUN echo -e "*/* acl bash-completion ipv6 kmod openrc pcre readline unicode \
zlib pam ssl sasl bzip2 urandom crypt tcpd\ zlib pam ssl sasl bzip2 urandom crypt tcpd \
-acpi -cairo -consolekit -cups -dbus -dri -gnome -gnutls -gtk -ogg -opengl\ -acpi -cairo -consolekit -cups -dbus -dri -gnome -gnutls -gtk -ogg -opengl \
-pdf -policykit -qt3support -qt5 -qt4 -sdl -sound -systemd -truetype -vim\ -pdf -policykit -qt3support -qt5 -qt4 -sdl -sound -systemd -truetype -vim \
-vim-syntax -wayland -X\ -vim-syntax -wayland -X" \
\n\
\nnet-mail/dovecot cydir imapc maildir mbox mdbox pam pop3c sieve sqlite\
\n\
\nmail-mta/postfix dovecot-sasl mbox sasl" \
>> /etc/paludis/use.conf >> /etc/paludis/use.conf
RUN mkdir -p /etc/paludis/use.conf.d && echo -e \
"net-mail/dovecot cydir imapc maildir managesieve mbox mdbox pam pop3c \
sieve sqlite \
\n \
\nmail-mta/postfix dovecot-sasl mbox sasl" \
>> /etc/paludis/use.conf.d/mail.conf
# update world with our USE flags # update world with our USE flags
RUN chgrp paludisbuild /dev/tty && cave resolve -c world -x RUN chgrp paludisbuild /dev/tty && cave resolve -c world -x
@ -56,6 +59,7 @@ COPY ./config/dovecot.master /etc/dovecot/conf.d/10-master.conf
COPY ./config/dovecot.lda /etc/dovecot/conf.d/15-lda.conf COPY ./config/dovecot.lda /etc/dovecot/conf.d/15-lda.conf
COPY ./config/dovecot.imap /etc/dovecot/conf.d/20-imap.conf COPY ./config/dovecot.imap /etc/dovecot/conf.d/20-imap.conf
COPY ./config/dovecot.sieve /etc/dovecot/conf.d/90-sieve.conf COPY ./config/dovecot.sieve /etc/dovecot/conf.d/90-sieve.conf
COPY ./config/dovecot.managesieve /etc/dovecot/conf.d/20-managesieve.conf
# Uncomment to add verbose logging # Uncomment to add verbose logging
COPY ./config/dovecot.logging /etc/dovecot/conf.d/10-logging.conf COPY ./config/dovecot.logging /etc/dovecot/conf.d/10-logging.conf
COPY ./config/supervisord.conf /etc/supervisord.conf COPY ./config/supervisord.conf /etc/supervisord.conf
@ -84,6 +88,6 @@ RUN mkdir -p /vmail/sieve && echo -e "require \"fileinto\";\
# Volume to store email # Volume to store email
VOLUME ["/vmail"] VOLUME ["/vmail"]
EXPOSE 25 143 587 EXPOSE 25 143 587 4190
ENTRYPOINT /boot; /usr/bin/supervisord -n ENTRYPOINT /boot; /usr/bin/supervisord -n

View File

@ -0,0 +1,76 @@
##
## ManageSieve specific settings
##
# Uncomment to enable managesieve protocol:
protocols = $protocols sieve
# Service definitions
service managesieve-login {
inet_listener sieve {
port = 4190
}
#inet_listener sieve_deprecated {
# port = 2000
#}
# Number of connections to handle before starting a new process. Typically
# the only useful values are 0 (unlimited) or 1. 1 is more secure, but 0
# is faster. <doc/wiki/LoginProcess.txt>
service_count = 1
# Number of processes to always keep waiting for more connections.
#process_min_avail = 0
# If you set service_count=0, you probably need to grow this.
#vsz_limit = 64M
}
service managesieve {
# Max. number of ManageSieve processes (connections)
process_limit = 1024
}
# Service configuration
protocol sieve {
# Maximum ManageSieve command line length in bytes. ManageSieve usually does
# not involve overly long command lines, so this setting will not normally
# need adjustment
#managesieve_max_line_length = 65536
# Maximum number of ManageSieve connections allowed for a user from each IP
# address.
# NOTE: The username is compared case-sensitively.
#mail_max_userip_connections = 10
# Space separated list of plugins to load (none known to be useful so far).
# Do NOT try to load IMAP plugins here.
#mail_plugins =
# MANAGESIEVE logout format string:
# %i - total number of bytes read from client
# %o - total number of bytes sent to client
#managesieve_logout_format = bytes=%i/%o
# To fool ManageSieve clients that are focused on CMU's timesieved you can
# specify the IMPLEMENTATION capability that Dovecot reports to clients.
# For example: 'Cyrus timsieved v2.2.13'
managesieve_implementation_string = Dovecot Pigeonhole
# Explicitly specify the SIEVE and NOTIFY capability reported by the server
# before login. If left unassigned these will be reported dynamically
# according to what the Sieve interpreter supports by default (after login
# this may differ depending on the user).
#managesieve_sieve_capability =
#managesieve_notify_capability =
# The maximum number of compile errors that are returned to the client upon
# script upload or script verification.
#managesieve_max_compile_errors = 5
# Refer to 90-sieve.conf for script quota configuration and configuration of
# Sieve execution limits.
}

View File

@ -1,5 +1,5 @@
plugin { plugin {
sieve_before = /vmail/sieve/spam-global.sieve sieve_before = /vmail/sieve/spam-global.sieve
sieve = /vmail/%d/%n/sieve/scripts/active.sieve sieve = file:/vmail/%d/%n/sieve/scripts/;active=/vmail/%d/%n/sieve/currently-active-script.sieve
sieve_extensions = +fileinto +imapflags +regex +copy sieve_extensions = +fileinto +imapflags +regex +copy
} }