diff --git a/core/Dockerfile b/core/Dockerfile index c404427..f9578f8 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -2,17 +2,20 @@ FROM hasufell/gentoo-amd64-paludis:latest MAINTAINER Julian Ospald "hasufell@posteo.de" # check these with "cave show " -RUN echo -e "*/* acl bash-completion ipv6 kmod openrc pcre readline unicode\ - zlib pam ssl sasl bzip2 urandom crypt tcpd\ - -acpi -cairo -consolekit -cups -dbus -dri -gnome -gnutls -gtk -ogg -opengl\ - -pdf -policykit -qt3support -qt5 -qt4 -sdl -sound -systemd -truetype -vim\ - -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" \ +RUN echo -e "*/* acl bash-completion ipv6 kmod openrc pcre readline unicode \ + zlib pam ssl sasl bzip2 urandom crypt tcpd \ + -acpi -cairo -consolekit -cups -dbus -dri -gnome -gnutls -gtk -ogg -opengl \ + -pdf -policykit -qt3support -qt5 -qt4 -sdl -sound -systemd -truetype -vim \ + -vim-syntax -wayland -X" \ >> /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 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.imap /etc/dovecot/conf.d/20-imap.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 COPY ./config/dovecot.logging /etc/dovecot/conf.d/10-logging.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 ["/vmail"] -EXPOSE 25 143 587 +EXPOSE 25 143 587 4190 ENTRYPOINT /boot; /usr/bin/supervisord -n diff --git a/core/config/dovecot.managesieve b/core/config/dovecot.managesieve new file mode 100644 index 0000000..8544b6d --- /dev/null +++ b/core/config/dovecot.managesieve @@ -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. + 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. +} diff --git a/core/config/dovecot.sieve b/core/config/dovecot.sieve index 5488781..a470d26 100644 --- a/core/config/dovecot.sieve +++ b/core/config/dovecot.sieve @@ -1,5 +1,5 @@ plugin { 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 }