Compare commits

...

42 Commits

Author SHA1 Message Date
DerLinkman f09c8534f5 Merge branch 'master' into feature/fts-xapian 2023-03-15 16:13:51 +01:00
DerLinkman 0408bbf57f Merge branch 'feature/bootstrap5' into feature/fts-xapian 2022-11-23 12:00:15 +01:00
DerLinkman eb4a33dc27 Implemented current state of UI (BS5) 2022-10-19 13:41:33 +02:00
DerLinkman a0ae59f8bf Added 1.20-Xapian Image 2022-10-07 17:19:15 +02:00
DerLinkman 60871fa7d0 Merge remote-tracking branch 'origin/staging' into feature/fts-xapian 2022-10-07 17:06:12 +02:00
DerLinkman 59a4031e24 Merge branch 'staging' into feature/fts-xapian 2022-10-07 17:03:28 +02:00
DerLinkman 04f55fc748 Updated newer Compenent Versions 2022-10-07 17:01:32 +02:00
DerLinkman 3ba3f1c2bd Updated Dovecot Configs to be up to date 2022-09-30 20:37:48 +02:00
DerLinkman b0fd9787b5 Enabled Substring Search for flatcurve 2022-07-20 15:49:43 +02:00
DerLinkman df3de09050 Multi Build Dovecot Building + Config Optimizations 2022-07-18 18:35:22 +02:00
DerLinkman 86079429b3 Using Stable Dovecot Builds for flatcurve 2022-07-18 14:24:46 +02:00
DerLinkman ed476aae6b Removed Solr Leftovers + renamed flatcurve conf 2022-07-18 11:15:40 +02:00
moo f0e27312f9 Restored manual Dovecot Build 2022-05-12 11:11:13 +02:00
moo 3425bcfbf0 Renamed, reconfigured needed Xapian files for Flatcurve 2022-04-29 14:35:54 +02:00
moo bfa81b318d Changed Build process to fts-flatcurve Version of Xapian FTS 2022-04-29 14:28:49 +02:00
Niklas Meyer 8dba0ca7dd
Merge branch 'staging' into feature/fts-xapian 2022-03-02 17:07:18 +01:00
Niklas Meyer 5bd3394ed9
Delete decode2text.sh 2022-02-23 16:12:15 +01:00
Niklas Meyer c0e66254b9
Cleanup Dockerfile + Added new dependencies 2022-02-23 09:45:28 +01:00
Niklas Meyer aec2dd1252
Merge pull request #4455 from DerLinkman/Dovecot-FTS-XAPIAN
[XAPIAN] Added Solr Replacement [BETA]
2022-02-07 08:39:17 +01:00
Niklas Meyer d86e9a22f4
Fetch Staging from orig Repo (#3)
* [Web] add github version tag

* [Web] add github version tag

* [Web] add github version tag

* [Web] add github version tag

* [Web] add github version tag

* [Web] add github version tag error handling

* [Web] add github version tag error handling

* Passwordless SOGo auth: support for calendar invitations and calendar/contacts subscriptions

Inviting someone to a calendar event triggers a request to /SOGo/so/otheruser@example.com/freebusy.ifb/ajaxRead. Subscribing to someone's calendar/contacts triggers a request to /SOGo/so/otheruser@example.com/foldersSearch. The email address in the URL is different from the logged-in user, which needs to be handled appropriately by sogo-auth.php.

* [Web] add github version tag - adjust css

* [Compose] Update SOGo Autoreply Schedule to 5m

Based on the advice of inverse (SOGo developer). Thanks to https://github.com/jmber

Closes: https://github.com/mailcow/mailcow-dockerized/issues/4436

* [Web] add github version tag - move twig globals

* [Web] add github version tag - missing </div>

* Passwordless SOGo auth: improvements for when accessing other users

* [WebAuthn] fido2 passwordless auth - fix (#4440)

* [WebAuthn] fido2 revert

* [WebAuthn] set UV flags to 'discouraged'

* [WebAuthn] revert - set UV flags to 'discouraged'

* Update clamav to 0.104.2

* Update clamav to 0.104.2

* Update dovecot to 2.3.18

Update gosu to 1.14
Use debian bullseye as base

* [Web] Updated lang.es.json [CI SKIP] (#4453)

Co-authored-by: Fijxu <fijxu@zzls.xyz>
Co-authored-by: milkmaker <milkmaker@mailcow.de>

Co-authored-by: Fijxu <fijxu@zzls.xyz>

Co-authored-by: FreddleSpl0it <patschul@posteo.de>
Co-authored-by: FreddleSpl0it <75116288+FreddleSpl0it@users.noreply.github.com>
Co-authored-by: Michael Kuron <mkuron@users.noreply.github.com>
Co-authored-by: Peter <magic@kthx.at>
Co-authored-by: milkmaker <milkmaker@mailcow.de>
Co-authored-by: Fijxu <fijxu@zzls.xyz>
2022-02-07 08:28:10 +01:00
Niklas Meyer db73f83c4e
Merge pull request #2 from mailcow/master
Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)
2022-02-07 08:21:31 +01:00
Niklas Meyer 28582c5842
[Compose] Changed Ofelia CMD for fts optimize 2022-02-01 14:50:19 +01:00
Niklas Meyer 3d637aca25
[Dovecot] Added Xapian Parameters from mailcow.conf 2022-02-01 14:48:46 +01:00
Niklas Meyer d079ff49c6
Update syslog-ng.conf 2022-01-28 17:21:20 +01:00
Niklas Meyer 2d6ce926e1
Update syslog-ng-redis_slave.conf 2022-01-28 17:21:07 +01:00
Niklas Meyer 60ddfe3be2
[Dovecot] Added Xapian include 2022-01-28 17:07:12 +01:00
Niklas Meyer 30e2d944cd
[Dovecot] Removed Xapian from dovecot.conf
This added a include try pointing on the file instead.
2022-01-28 16:51:33 +01:00
Niklas Meyer 99ea569288
[Dovecot] Added seperate XAPIAN Conf 2022-01-28 16:49:58 +01:00
Niklas Meyer c98ef0d0c5
Delete FTS-Xapian.conf 2022-01-28 16:49:30 +01:00
Niklas Meyer f09ca0a36a
[Dovecot] Added seperate XAPIAN Conf 2022-01-28 16:48:51 +01:00
Niklas Meyer cdce97bd59
[Dovecot] Changed Xapian default to 1024m instead of 2G 2022-01-28 15:03:23 +01:00
Niklas Meyer ed8941440a
[Dovecot] Added Xapian default config 2022-01-28 12:27:57 +01:00
Niklas Meyer 570170a5b1
[Compose] Remove solr from ipv6-nat dependencies 2022-01-28 12:24:51 +01:00
Niklas Meyer df2c33d323
[Compose] Replace solr to Xapian (in dovecot)
First revision. Waiting on: https://github.com/grosjo/fts-xapian/issues/115
2022-01-28 11:19:38 +01:00
Niklas Meyer f2e0e50f87
[Config] Readded default Value for Xapian Heap 2022-01-28 11:01:31 +01:00
Niklas Meyer 26c5ed73e2
[Config] Replace Solr with Xapian (Remove Solr Binds) 2022-01-28 10:45:33 +01:00
Niklas Meyer 148b511f9d
[Update.sh] Replace Solr with Xapian 2022-01-28 10:44:08 +01:00
Niklas Meyer 311007700b
[Dovecot] Add decode2text.sh 2022-01-27 15:36:03 +01:00
Niklas Meyer 3a9177bd4c
Merge branch 'mailcow:master' into Dovecot-FTS-XAPIAN 2022-01-27 08:24:43 +01:00
Niklas Meyer bca09e3afa
[Dovecot] Rebase on Bullseye + Xapian Compile
This Push adds the bullseye rebase + the compilation of the XAPIAN Core + Plugin to run with Dovecot 2.3.17
2022-01-27 08:24:28 +01:00
Peter cfba96f7e0
[GH-Actions][stale] Add neverstale label to exempt list 2022-01-22 17:41:46 +01:00
ntimo c82f38a025
[API] Fix minor issue in api docs 2022-01-21 21:29:16 +00:00
8 changed files with 218 additions and 91 deletions

1
.gitignore vendored
View File

@ -13,6 +13,7 @@ data/conf/dovecot/acl_anyone
data/conf/dovecot/dovecot-master.passwd data/conf/dovecot/dovecot-master.passwd
data/conf/dovecot/dovecot-master.userdb data/conf/dovecot/dovecot-master.userdb
data/conf/dovecot/extra.conf data/conf/dovecot/extra.conf
data/conf/dovecot/dovecot-fts-flatcurve.conf
data/conf/dovecot/global_sieve_* data/conf/dovecot/global_sieve_*
data/conf/dovecot/last_login data/conf/dovecot/last_login
data/conf/dovecot/lua data/conf/dovecot/lua

View File

@ -1,24 +1,15 @@
FROM debian:bullseye-slim FROM debian:bullseye-slim as build
LABEL maintainer "Andre Peters <andre.peters@servercow.de>" LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
# renovate: datasource=github-tags depName=dovecot/core versioning=semver-coerced ARG DOVECOT=2.3.19.1
ARG DOVECOT=2.3.20 ARG FLATCURVE=v0.3.2
# renovate: datasource=github-releases depName=tianon/gosu versioning=semver-coerced ARG XAPIAN=1.4.21
ARG GOSU_VERSION=1.16
ENV LC_ALL C ENV LC_ALL C
# Add groups and users before installing Dovecot to not break compatibility # Add groups and users before installing Dovecot to not break compatibility
RUN groupadd -g 5000 vmail \ RUN touch /etc/default/locale \
&& groupadd -g 401 dovecot \
&& groupadd -g 402 dovenull \
&& groupadd -g 999 sogo \
&& usermod -a -G sogo nobody \
&& useradd -g vmail -u 5000 vmail -d /var/vmail \
&& useradd -c "Dovecot unprivileged user" -d /dev/null -u 401 -g dovecot -s /bin/false dovecot \
&& useradd -c "Dovecot login user" -d /dev/null -u 402 -g dovenull -s /bin/false dovenull \
&& touch /etc/default/locale \
&& apt-get update \ && apt-get update \
&& apt-get -y --no-install-recommends install \ && apt-get -y --no-install-recommends install \
apt-transport-https \ apt-transport-https \
@ -76,7 +67,13 @@ RUN groupadd -g 5000 vmail \
libunicode-string-perl \ libunicode-string-perl \
liburi-perl \ liburi-perl \
libwww-perl \ libwww-perl \
libstemmer-dev \
libexttextcat-dev \
libldap-dev \
libghc-bzlib-dev \
lua-sql-mysql \ lua-sql-mysql \
liblz4-dev \
libzstd-dev \
lua-socket \ lua-socket \
mariadb-client \ mariadb-client \
procps \ procps \
@ -87,30 +84,152 @@ RUN groupadd -g 5000 vmail \
syslog-ng-core \ syslog-ng-core \
syslog-ng-mod-redis \ syslog-ng-mod-redis \
wget \ wget \
git \
bison \
flex \
build-essential \
autoconf \
automake \
libtool \
make \
libxapian-dev \
default-libmysqlclient-dev \
libicu-dev \
zlib1g-dev \
pkg-config \
libsqlite3-dev \
liblua5.3-dev \
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \ && dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
&& chmod +x /usr/local/bin/gosu \ && chmod +x /usr/local/bin/gosu \
&& gosu nobody true \ && gosu nobody true
&& apt-key adv --fetch-keys https://repo.dovecot.org/DOVECOT-REPO-GPG \ # && apt-key adv --fetch-keys https://repo.dovecot.org/DOVECOT-REPO-GPG \
&& echo "deb https://repo.dovecot.org/ce-${DOVECOT}/debian/bullseye bullseye main" > /etc/apt/sources.list.d/dovecot.list \ # && echo "deb https://repo.dovecot.org/ce-${DOVECOT}/debian/bullseye bullseye main" > /etc/apt/sources.list.d/dovecot.list \
&& apt-get update \ # && apt-get update \
&& apt-get -y --no-install-recommends install \ # && apt-get -y --no-install-recommends install \
dovecot-lua \ # dovecot-lua \
dovecot-managesieved \ # dovecot-managesieved \
dovecot-sieve \ # dovecot-sieve \
dovecot-lmtpd \ # dovecot-lmtpd \
dovecot-ldap \ # dovecot-ldap \
dovecot-mysql \ # dovecot-mysql \
dovecot-core \ # dovecot-core \
dovecot-pop3d \ # dovecot-pop3d \
dovecot-imapd \ # dovecot-imapd \
dovecot-solr \ # dovecot-dev
&& pip3 install mysql-connector-python html2text jinja2 redis \
&& apt-get autoremove --purge -y \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* /var/tmp/* /root/.cache/
RUN cd /tmp && git clone --depth 1 --branch ${DOVECOT} https://github.com/dovecot/core.git dovecot/core && cd dovecot/core \
&& ./autogen.sh \
&& PANDOC=false ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-ssldir=/etc/ssl --enable-maintainer-mode --with-sql=yes --with-lua=yes --with-mysql --with-ldap --with-zstd --with-lz4 --with-ssl=openssl --with-notify=inotify --with-bzlib --with-zlib --enable-hardening --with-stemmer --with-textcat --with-icu \
&& make -j6 \
&& make install \
&& make clean
RUN cd /tmp && git clone --depth 1 --branch release-0.5 https://github.com/dovecot/pigeonhole dovecot/pigeonhole && cd dovecot/pigeonhole \
&& ./autogen.sh \
&& ./configure --with-dovecot=/usr/lib/dovecot --with-managesieve\
&& make -j6 \
&& make install \
&& make clean
RUN cd /tmp && wget https://oligarchy.co.uk/xapian/${XAPIAN}/xapian-core-${XAPIAN}.tar.xz && tar xf xapian-core-${XAPIAN}.tar.xz && cd xapian-core-${XAPIAN} \
&& ./configure --prefix=/usr/local/xapian \
&& make -j6 \
&& make install \
&& make clean
RUN cd /tmp && git clone --depth 1 --branch ${FLATCURVE} https://github.com/slusarz/dovecot-fts-flatcurve.git dovecot/flatcurve && cd dovecot/flatcurve \
&& ./autogen.sh \
&& ./configure --with-dovecot=/usr/lib/dovecot \
&& make -j6 \
&& make install \
&& make clean
FROM debian:bullseye-slim
RUN groupadd -g 5000 vmail \
&& groupadd -g 401 dovecot \
&& groupadd -g 402 dovenull \
&& groupadd -g 999 sogo \
&& usermod -a -G sogo nobody \
&& useradd -g vmail -u 5000 vmail -d /var/vmail \
&& useradd -c "Dovecot unprivileged user" -d /dev/null -u 401 -g dovecot -s /bin/false dovecot \
&& useradd -c "Dovecot login user" -d /dev/null -u 402 -g dovenull -s /bin/false dovenull \
&& apt update && apt install lua-socket \
mariadb-client \
libstemmer-dev \
libexttextcat-dev \
libicu-dev \
libxapian-dev \
libsqlite3-dev \
liblua5.3-dev \
lua-sql-mysql \
libldap-dev \
procps \
python3-pip \
redis-server \
supervisor \
syslog-ng \
syslog-ng-core \
syslog-ng-mod-redis \
cpanminus \
curl \
libauthen-ntlm-perl \
libcgi-pm-perl \
libcrypt-openssl-rsa-perl \
libcrypt-ssleay-perl \
libdata-uniqid-perl \
libdbd-mysql-perl \
libdbi-perl \
libdigest-hmac-perl \
libdist-checkconflicts-perl \
libencode-imaputf7-perl \
libfile-copy-recursive-perl \
libfile-tail-perl \
libhtml-parser-perl \
libio-compress-perl \
libio-socket-inet6-perl \
libio-socket-ssl-perl \
libio-tee-perl \
libipc-run-perl \
libjson-webtoken-perl \
liblockfile-simple-perl \
libmail-imapclient-perl \
libmodule-implementation-perl \
libmodule-scandeps-perl \
libnet-ssleay-perl \
libpackage-stash-perl \
libpackage-stash-xs-perl \
libpar-packer-perl \
libparse-recdescent-perl \
libproc-processtable-perl \
libreadonly-perl \
libregexp-common-perl \
libsys-meminfo-perl \
libterm-readkey-perl \
libtest-deep-perl \
libtest-fatal-perl \
libtest-mock-guard-perl \
libtest-mockobject-perl \
libtest-nowarnings-perl \
libtest-pod-perl \
libtest-requires-perl \
libtest-simple-perl \
libtest-warn-perl \
libtry-tiny-perl \
libunicode-string-perl \
liburi-perl \
libwww-perl \
dnsutils \
gettext-base -y --no-install-recommends \
&& pip3 install mysql-connector-python html2text jinja2 redis
COPY --from=build /usr/lib/dovecot /usr/lib/dovecot
COPY --from=build /usr/bin/doveconf /usr/bin/doveconf
COPY --from=build /usr/bin/doveadm /usr/bin/doveadm
COPY --from=build /usr/bin/dovecot-sysreport /usr/bin/dovecot-sysreport
COPY --from=build /usr/sbin/dovecot /usr/sbin/dovecot
COPY --from=build /usr/libexec/dovecot/ /usr/libexec/dovecot/
COPY --from=build /usr/local/bin /usr/local/bin
COPY --from=build /usr/local/xapian/ /usr/local/xapian
COPY trim_logs.sh /usr/local/bin/trim_logs.sh COPY trim_logs.sh /usr/local/bin/trim_logs.sh
COPY clean_q_aged.sh /usr/local/bin/clean_q_aged.sh COPY clean_q_aged.sh /usr/local/bin/clean_q_aged.sh
COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf

View File

@ -109,17 +109,19 @@ EOF
echo -n ${ACL_ANYONE} > /etc/dovecot/acl_anyone echo -n ${ACL_ANYONE} > /etc/dovecot/acl_anyone
if [[ "${SKIP_SOLR}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then if [[ "${SKIP_XAPIAN}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
echo -n 'quota acl zlib mail_crypt mail_crypt_acl mail_log notify listescape replication' > /etc/dovecot/mail_plugins echo -n 'quota acl zlib mail_crypt mail_crypt_acl mail_log notify listescape replication' > /etc/dovecot/mail_plugins
echo -n 'quota imap_quota imap_acl acl zlib imap_zlib imap_sieve mail_crypt mail_crypt_acl notify listescape replication mail_log' > /etc/dovecot/mail_plugins_imap echo -n 'quota imap_quota imap_acl acl zlib imap_zlib imap_sieve mail_crypt mail_crypt_acl notify listescape replication mail_log' > /etc/dovecot/mail_plugins_imap
echo -n 'quota sieve acl zlib mail_crypt mail_crypt_acl notify listescape replication' > /etc/dovecot/mail_plugins_lmtp echo -n 'quota sieve acl zlib mail_crypt mail_crypt_acl notify listescape replication' > /etc/dovecot/mail_plugins_lmtp
else else
echo -n 'quota acl zlib mail_crypt mail_crypt_acl mail_log notify fts fts_solr listescape replication' > /etc/dovecot/mail_plugins echo -n 'quota acl zlib mail_crypt mail_crypt_acl mail_log notify fts fts_flatcurve listescape replication' > /etc/dovecot/mail_plugins
echo -n 'quota imap_quota imap_acl acl zlib imap_zlib imap_sieve mail_crypt mail_crypt_acl notify mail_log fts fts_solr listescape replication' > /etc/dovecot/mail_plugins_imap echo -n 'quota imap_quota imap_acl acl zlib imap_zlib imap_sieve mail_crypt mail_crypt_acl notify mail_log fts fts_flatcurve listescape replication' > /etc/dovecot/mail_plugins_imap
echo -n 'quota sieve acl zlib mail_crypt mail_crypt_acl fts fts_solr notify listescape replication' > /etc/dovecot/mail_plugins_lmtp echo -n 'quota sieve acl zlib mail_crypt mail_crypt_acl fts fts_flatcurve notify listescape replication' > /etc/dovecot/mail_plugins_lmtp
fi fi
chmod 644 /etc/dovecot/mail_plugins /etc/dovecot/mail_plugins_imap /etc/dovecot/mail_plugins_lmtp /templates/quarantine.tpl chmod 644 /etc/dovecot/mail_plugins /etc/dovecot/mail_plugins_imap /etc/dovecot/mail_plugins_lmtp /templates/quarantine.tpl
sed -i 's/vsz_limit.*/vsz_limit = '${XAPIAN_HEAP}m/g /etc/dovecot/dovecot-fts-flatcurve.conf
cat <<EOF > /etc/dovecot/sql/dovecot-dict-sql-userdb.conf cat <<EOF > /etc/dovecot/sql/dovecot-dict-sql-userdb.conf
# Autogenerated by mailcow # Autogenerated by mailcow
driver = mysql driver = mysql

View File

@ -0,0 +1,23 @@
plugin {
fts = flatcurve
fts_autoindex = yes
fts_languages = en de
fts_tokenizers = generic email-address
fts_tokenizer_generic = algorithm=simple
# All of these are optional, and indicate the default values.
# They are listed here for documentation purposes; most people should
# not need to define/override in their config.
fts_flatcurve_commit_limit = 500
fts_flatcurve_max_term_size = 30
fts_flatcurve_min_term_size = 2
fts_flatcurve_optimize_limit = 10
fts_flatcurve_rotate_size = 5000
fts_flatcurve_rotate_time = 5000
fts_flatcurve_substring_search = yes
}
service indexer-worker {
vsz_limit = 1024m
}

View File

@ -11,6 +11,7 @@ auth_mechanisms = plain login
#mail_debug = yes #mail_debug = yes
#auth_debug = yes #auth_debug = yes
log_path = syslog log_path = syslog
log_debug = category=fts-flatcurve
disable_plaintext_auth = yes disable_plaintext_auth = yes
# Uncomment on NFS share # Uncomment on NFS share
#mmap_disable = yes #mmap_disable = yes
@ -189,9 +190,6 @@ plugin {
acl_shared_dict = file:/var/vmail/shared-mailboxes.db acl_shared_dict = file:/var/vmail/shared-mailboxes.db
acl = vfile acl = vfile
acl_user = %u acl_user = %u
fts = solr
fts_autoindex = yes
fts_solr = url=http://solr:8983/solr/dovecot-fts/
quota = dict:Userquota::proxy::sqlquota quota = dict:Userquota::proxy::sqlquota
quota_rule2 = Trash:storage=+100%% quota_rule2 = Trash:storage=+100%%
sieve = /var/vmail/sieve/%u.sieve sieve = /var/vmail/sieve/%u.sieve
@ -242,6 +240,7 @@ plugin {
mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
mail_log_fields = uid box msgid size mail_log_fields = uid box msgid size
mail_log_cached_only = yes mail_log_cached_only = yes
} }
service quota-warning { service quota-warning {
executable = script /usr/local/bin/quota_notify.py executable = script /usr/local/bin/quota_notify.py
@ -297,6 +296,7 @@ replication_dsync_parameters = -d -l 30 -U -n INBOX
!include_try /etc/dovecot/extra.conf !include_try /etc/dovecot/extra.conf
!include_try /etc/dovecot/sogo-sso.conf !include_try /etc/dovecot/sogo-sso.conf
!include_try /etc/dovecot/shared_namespace.conf !include_try /etc/dovecot/shared_namespace.conf
!include_try /etc/dovecot/dovecot-fts-flatcurve.conf
# </Includes> # </Includes>
default_client_limit = 10400 default_client_limit = 10400
default_vsz_limit = 1024 M default_vsz_limit = 1024 M

View File

@ -154,7 +154,7 @@ services:
- API_KEY_READ_ONLY=${API_KEY_READ_ONLY:-invalid} - API_KEY_READ_ONLY=${API_KEY_READ_ONLY:-invalid}
- API_ALLOW_FROM=${API_ALLOW_FROM:-invalid} - API_ALLOW_FROM=${API_ALLOW_FROM:-invalid}
- COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME:-mailcow-dockerized} - COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME:-mailcow-dockerized}
- SKIP_SOLR=${SKIP_SOLR:-y} - SKIP_XAPIAN=${SKIP_XAPIAN:-y}
- SKIP_CLAMD=${SKIP_CLAMD:-n} - SKIP_CLAMD=${SKIP_CLAMD:-n}
- SKIP_SOGO=${SKIP_SOGO:-n} - SKIP_SOGO=${SKIP_SOGO:-n}
- ALLOW_ADMIN_EMAIL_LOGIN=${ALLOW_ADMIN_EMAIL_LOGIN:-n} - ALLOW_ADMIN_EMAIL_LOGIN=${ALLOW_ADMIN_EMAIL_LOGIN:-n}
@ -216,7 +216,7 @@ services:
- sogo - sogo
dovecot-mailcow: dovecot-mailcow:
image: mailcow/dovecot:1.22 image: mailcow/dovecot:1.20-xapian
depends_on: depends_on:
- mysql-mailcow - mysql-mailcow
dns: dns:
@ -250,7 +250,8 @@ services:
- ALLOW_ADMIN_EMAIL_LOGIN=${ALLOW_ADMIN_EMAIL_LOGIN:-n} - ALLOW_ADMIN_EMAIL_LOGIN=${ALLOW_ADMIN_EMAIL_LOGIN:-n}
- MAILDIR_GC_TIME=${MAILDIR_GC_TIME:-7200} - MAILDIR_GC_TIME=${MAILDIR_GC_TIME:-7200}
- ACL_ANYONE=${ACL_ANYONE:-disallow} - ACL_ANYONE=${ACL_ANYONE:-disallow}
- SKIP_SOLR=${SKIP_SOLR:-y} - SKIP_XAPIAN=${SKIP_XAPIAN:-y}
- XAPIAN_HEAP=${XAPIAN_HEAP:-1024}
- MAILDIR_SUB=${MAILDIR_SUB:-} - MAILDIR_SUB=${MAILDIR_SUB:-}
- MASTER=${MASTER:-y} - MASTER=${MASTER:-y}
- REDIS_SLAVEOF_IP=${REDIS_SLAVEOF_IP:-} - REDIS_SLAVEOF_IP=${REDIS_SLAVEOF_IP:-}
@ -281,7 +282,7 @@ services:
ofelia.job-exec.dovecot_sarules.schedule: "@every 24h" ofelia.job-exec.dovecot_sarules.schedule: "@every 24h"
ofelia.job-exec.dovecot_sarules.command: "/bin/bash -c \"/usr/local/bin/sa-rules.sh\"" ofelia.job-exec.dovecot_sarules.command: "/bin/bash -c \"/usr/local/bin/sa-rules.sh\""
ofelia.job-exec.dovecot_fts.schedule: "@every 24h" ofelia.job-exec.dovecot_fts.schedule: "@every 24h"
ofelia.job-exec.dovecot_fts.command: "/usr/bin/curl http://solr:8983/solr/dovecot-fts/update?optimize=true" ofelia.job-exec.dovecot_fts.command: "doveadm fts optimize -A"
ofelia.job-exec.dovecot_repl_health.schedule: "@every 5m" ofelia.job-exec.dovecot_repl_health.schedule: "@every 5m"
ofelia.job-exec.dovecot_repl_health.command: "/bin/bash -c \"/usr/local/bin/gosu vmail /usr/local/bin/repl_health.sh\"" ofelia.job-exec.dovecot_repl_health.command: "/bin/bash -c \"/usr/local/bin/gosu vmail /usr/local/bin/repl_health.sh\""
ulimits: ulimits:
@ -528,22 +529,6 @@ services:
aliases: aliases:
- dockerapi - dockerapi
solr-mailcow:
image: mailcow/solr:1.8.1
restart: always
volumes:
- solr-vol-1:/opt/solr/server/solr/dovecot-fts/data
ports:
- "${SOLR_PORT:-127.0.0.1:18983}:8983"
environment:
- TZ=${TZ}
- SOLR_HEAP=${SOLR_HEAP:-1024}
- SKIP_SOLR=${SKIP_SOLR:-y}
networks:
mailcow-network:
aliases:
- solr
olefy-mailcow: olefy-mailcow:
image: mailcow/olefy:1.11 image: mailcow/olefy:1.11
restart: always restart: always
@ -599,7 +584,6 @@ services:
- netfilter-mailcow - netfilter-mailcow
- watchdog-mailcow - watchdog-mailcow
- dockerapi-mailcow - dockerapi-mailcow
- solr-mailcow
environment: environment:
- TZ=${TZ} - TZ=${TZ}
image: robbertkl/ipv6nat image: robbertkl/ipv6nat
@ -631,7 +615,6 @@ volumes:
mysql-socket-vol-1: mysql-socket-vol-1:
redis-vol-1: redis-vol-1:
rspamd-vol-1: rspamd-vol-1:
solr-vol-1:
postfix-vol-1: postfix-vol-1:
crypt-vol-1: crypt-vol-1:
sogo-web-vol-1: sogo-web-vol-1:

View File

@ -122,23 +122,23 @@ else
fi fi
if [ ${MEM_TOTAL} -le "2097152" ]; then if [ ${MEM_TOTAL} -le "2097152" ]; then
echo "Disabling Solr on low-memory system." echo "Disabling Xapian (full text search, build in Dovecot) on low-memory system."
SKIP_SOLR=y SKIP_XAPIAN=y
elif [ ${MEM_TOTAL} -le "3670016" ]; then elif [ ${MEM_TOTAL} -le "3670016" ]; then
echo "Installed memory is <= 3.5 GiB. It is recommended to disable Solr to prevent out-of-memory situations." echo "Installed memory is <= 3.5 GiB. We suggest you to disable Xapian (full text search, build in Dovecot) to prevent out-of-memory situations."
echo "Solr is a prone to run OOM and should be monitored. The default Solr heap size is 1024 MiB and should be set in mailcow.conf according to your expected load." echo "The default Xapian heap size is 1024 MiB and should be set in mailcow.conf according to your expected load."
echo "Solr can be re-enabled by setting SKIP_SOLR=n in mailcow.conf but will refuse to start with less than 2 GB total memory." echo "Xapian can be re-enabled by setting SKIP_XAPIAN=n in mailcow.conf but will refuse to start with less than 2 GB total memory."
read -r -p "Do you want to disable Solr now? [Y/n] " response read -r -p "Do you want to disable the FTS Xapian now? [Y/n] " response
case $response in case $response in
[nN][oO]|[nN]) [nN][oO]|[nN])
SKIP_SOLR=n SKIP_XAPIAN=n
;; ;;
*) *)
SKIP_SOLR=y SKIP_XAPIAN=y
;; ;;
esac esac
else else
SKIP_SOLR=n SKIP_XAPIAN=n
fi fi
if [[ ${SKIP_BRANCH} != y ]]; then if [[ ${SKIP_BRANCH} != y ]]; then
@ -243,7 +243,6 @@ POPS_PORT=995
SIEVE_PORT=4190 SIEVE_PORT=4190
DOVEADM_PORT=127.0.0.1:19991 DOVEADM_PORT=127.0.0.1:19991
SQL_PORT=127.0.0.1:13306 SQL_PORT=127.0.0.1:13306
SOLR_PORT=127.0.0.1:18983
REDIS_PORT=127.0.0.1:7654 REDIS_PORT=127.0.0.1:7654
# Your timezone # Your timezone
@ -329,14 +328,14 @@ SKIP_CLAMD=${SKIP_CLAMD}
SKIP_SOGO=n SKIP_SOGO=n
# Skip Solr on low-memory systems or if you do not want to store a readable index of your mails in solr-vol-1. # Skip Xapian (FTS) on low-memory systems or if you do not want to store a readable index of your mails in vmail-index-vol-1.
SKIP_SOLR=${SKIP_SOLR} SKIP_XAPIAN=${SKIP_XAPIAN}
# Solr heap size in MB, there is no recommendation, please see Solr docs. # Xapian heap size in MB, there is no recommendation, please see Xapians docs.
# Solr is a prone to run OOM and should be monitored. Unmonitored Solr setups are not recommended. # Xapian is replacing solr completely. It is supposed to be much more efficient in CPU and RAM consumption.
SOLR_HEAP=1024 XAPIAN_HEAP=1024
# Allow admins to log into SOGo as email user (without any password) # Allow admins to log into SOGo as email user (without any password)

View File

@ -388,8 +388,8 @@ CONFIG_ARRAY=(
"MAILDIR_GC_TIME" "MAILDIR_GC_TIME"
"MAILDIR_SUB" "MAILDIR_SUB"
"ACL_ANYONE" "ACL_ANYONE"
"SOLR_HEAP" "XAPIAN_HEAP"
"SKIP_SOLR" "SKIP_XAPIAN"
"ENABLE_SSL_SNI" "ENABLE_SSL_SNI"
"ALLOW_ADMIN_EMAIL_LOGIN" "ALLOW_ADMIN_EMAIL_LOGIN"
"SKIP_HTTP_VERIFICATION" "SKIP_HTTP_VERIFICATION"
@ -510,20 +510,20 @@ for option in ${CONFIG_ARRAY[@]}; do
echo '# Otherwise a user might share data with too many other users.' >> mailcow.conf echo '# Otherwise a user might share data with too many other users.' >> mailcow.conf
echo 'ACL_ANYONE=disallow' >> mailcow.conf echo 'ACL_ANYONE=disallow' >> mailcow.conf
fi fi
elif [[ ${option} == "SOLR_HEAP" ]]; then elif [[ ${option} == "XAPIAN_HEAP" ]]; then
if ! grep -q ${option} mailcow.conf; then if ! grep -q ${option} mailcow.conf; then
echo "Adding new option \"${option}\" to mailcow.conf" echo "Replacing SOLR_HEAP with \"${option}\" in mailcow.conf"
echo '# Solr heap size, there is no recommendation, please see Solr docs.' >> mailcow.conf sed -i '/# Solr heap size in MB, there is no recommendation, please see Solr docs./c\# Xapian heap size in MB, there is no recommendation, please see Xapians docs.' mailcow.conf
echo '# Solr is a prone to run OOM on large systems and should be monitored. Unmonitored Solr setups are not recommended.' >> mailcow.conf sed -i '/# Solr is a prone to run OOM on large systems and should be monitored. Unmonitored Solr setups are not recommended./c\# Xapian is replacing solr completely. It is supposed to be much more efficient in CPU and RAM consumption.' mailcow.conf
echo '# Solr will refuse to start with total system memory below or equal to 2 GB.' >> mailcow.conf sed -i '/SOLR_HEAP=/c\XAPIAN_HEAP=' mailcow.conf
echo "SOLR_HEAP=1024" >> mailcow.conf
fi fi
elif [[ ${option} == "SKIP_SOLR" ]]; then elif [[ ${option} == "SKIP_XAPIAN" ]]; then
if ! grep -q ${option} mailcow.conf; then if ! grep -q ${option} mailcow.conf; then
echo "Adding new option \"${option}\" to mailcow.conf" echo "Replacing SKIP_SOLR with \"${option}\" in mailcow.conf"
echo '# Solr is disabled by default after upgrading from non-Solr to Solr-enabled mailcows.' >> mailcow.conf sed -i '/# Skip Solr on low-memory systems or if you do not want to store a readable index of your mails in solr-vol-1./c\# Skip Xapian (FTS) on low-memory systems or if you do not want to store a readable index of your mails in vmail-index-vol-1.' mailcow.conf
echo '# Disable Solr or if you do not want to store a readable index of your mails in solr-vol-1.' >> mailcow.conf sed -i '/SKIP_SOLR=/c\SKIP_XAPIAN=' mailcow.conf
echo "SKIP_SOLR=y" >> mailcow.conf echo "Removing Solr-Port Binding from mailcow.conf"
sed -i '/SOLR_PORT=/d' mailcow.conf
fi fi
elif [[ ${option} == "ENABLE_SSL_SNI" ]]; then elif [[ ${option} == "ENABLE_SSL_SNI" ]]; then
if ! grep -q ${option} mailcow.conf; then if ! grep -q ${option} mailcow.conf; then