Merge branch 'master' into fix-swarm-start
This commit is contained in:
@@ -3,12 +3,13 @@ FROM alpine:3.7
|
||||
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||||
&& apk add --no-cache \
|
||||
dovecot dovecot-sqlite dovecot-pigeonhole-plugin dovecot-pigeonhole-plugin-extdata \
|
||||
rspamd-client@testing python py-jinja2
|
||||
dovecot-fts-lucene rspamd-client@testing python py-jinja2
|
||||
|
||||
COPY conf /conf
|
||||
COPY sieve /var/lib/dovecot
|
||||
COPY start.py /start.py
|
||||
|
||||
EXPOSE 110/tcp 143/tcp 993/tcp 4190/tcp 2525/tcp
|
||||
VOLUME ["/data", "/mail"]
|
||||
|
||||
CMD /start.py
|
||||
|
||||
@@ -18,6 +18,20 @@ dict {
|
||||
sieve = sqlite:/etc/dovecot/pigeonhole-sieve.dict
|
||||
}
|
||||
|
||||
###############
|
||||
# Full-text search
|
||||
###############
|
||||
mail_plugins = $mail_plugins fts fts_lucene
|
||||
|
||||
plugin {
|
||||
fts = lucene
|
||||
|
||||
fts_autoindex = yes
|
||||
fts_autoindex_exclude = \Junk
|
||||
|
||||
fts_lucene = whitespace_chars=@.
|
||||
}
|
||||
|
||||
###############
|
||||
# Mailboxes
|
||||
###############
|
||||
@@ -32,7 +46,7 @@ mail_access_groups = mail
|
||||
maildir_stat_dirs = yes
|
||||
mailbox_list_index = yes
|
||||
mail_vsize_bg_after_count = 100
|
||||
mail_plugins = $mail_plugins quota quota_clone
|
||||
mail_plugins = $mail_plugins quota quota_clone zlib
|
||||
|
||||
namespace inbox {
|
||||
inbox = yes
|
||||
@@ -58,6 +72,14 @@ plugin {
|
||||
quota = count:User quota
|
||||
quota_vsizes = yes
|
||||
quota_clone_dict = redis:host={{ REDIS_ADDRESS }}:port=6379:db=1
|
||||
|
||||
{% if COMPRESSION in [ 'gz', 'bz2' ] %}
|
||||
zlib_save = {{ COMPRESSION }}
|
||||
{% endif %}
|
||||
|
||||
{% if COMPRESSION_LEVEL %}
|
||||
zlib_save_level = {{ COMPRESSION_LEVEL }}
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
###############
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
require "vnd.dovecot.execute";
|
||||
require ["vnd.dovecot.execute", "copy", "imapsieve", "environment", "variables"];
|
||||
|
||||
if environment :matches "imap.mailbox" "*" {
|
||||
set "mailbox" "${1}";
|
||||
}
|
||||
|
||||
if string "${mailbox}" "Trash" {
|
||||
stop;
|
||||
}
|
||||
|
||||
execute :pipe "mailtrain" "ham";
|
||||
|
||||
Reference in New Issue
Block a user