Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic PR to nightly from 2024-12-06T07:58:30Z #6202

Merged
merged 39 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
bd9f4ba
Merge pull request #6173 from mailcow/staging
DerLinkman Nov 15, 2024
31185e3
Implement search mailboxes by fullname
h3ssan Nov 27, 2024
d1af52b
Add initial Japanese language files (#6198)
kotaroman Dec 6, 2024
8853e2c
[Nginx] Use SOGo IPv4 for upstream
FreddleSpl0it Dec 9, 2024
2445399
Merge pull request #6186 from h3ssan/feat/search-mailbox-by-full-name
FreddleSpl0it Dec 9, 2024
49e05f5
[Web] fix oauth2 redirect after login
FreddleSpl0it Dec 9, 2024
fa3b789
[Web] fix issue #6185
FreddleSpl0it Dec 9, 2024
ed2837e
Remove legacy Nextcloud settings (#6050)
MAGICCC Dec 9, 2024
60ca250
add temporary email description
marekfilip Aug 9, 2024
0d635e2
increase migrations verion
marekfilip Aug 12, 2024
1a8e1a2
add escape html for description
marekfilip Aug 15, 2024
7c8e5c1
Add create command to prevent external: true warnings (#6203)
codiflow Dec 10, 2024
3875e83
sogo: added SOGoDisableOrganizerEventCheck value to sogo.conf (#6204)
DerLinkman Dec 10, 2024
f065842
Updated to $_REQUEST.
PhoenixPeca Dec 11, 2024
d09e4ff
Convert AJAX to POST request
PhoenixPeca Dec 11, 2024
b087ac9
Translations update from Weblate (#6206)
milkmaker Dec 11, 2024
3e8bb06
dovecot: replace solr fts with flatcurve (xapian) (#5680)
DerLinkman Dec 12, 2024
de80c12
update.sh: added silent fix for removing old fts.conf in order to upd…
DerLinkman Dec 12, 2024
1c6684a
compose: fix dovecot tagging
DerLinkman Dec 12, 2024
357a4d7
[Web] Updated lang.fr-fr.json (#6209)
milkmaker Dec 13, 2024
c6f6eda
Fix missing property in Create Sync Job request
jan-oratowski Dec 14, 2024
2d2dacb
[Web] Updated lang.fr-fr.json (#6221)
milkmaker Dec 19, 2024
40a8bc8
update postscreen_access.cidr (#6232)
milkmaker Jan 1, 2025
150b2bb
Merge branch 'mailcow:master' into feat/temp-email-aliases
marekfilip Jan 3, 2025
1032898
Translations update from Weblate (#6235)
milkmaker Jan 5, 2025
69f6a82
[Web] Updated lang.fr-fr.json (#6238)
milkmaker Jan 9, 2025
abd789f
[Web] Escape mailbox name before querying aliases
FreddleSpl0it Jan 14, 2025
d280025
[Web] Regenerate session_id on successful login
FreddleSpl0it Jan 14, 2025
24b3d8f
Merge pull request #6001 from marekfilip/feat/temp-email-aliases
FreddleSpl0it Jan 14, 2025
2f1884e
Merge pull request #6205 from PhoenixPeca/master
FreddleSpl0it Jan 14, 2025
8fea9fc
Merge pull request #6211 from jan-oratowski/patch-1
FreddleSpl0it Jan 14, 2025
31e001e
flatcurve: change default amount of processes to 1
DerLinkman Jan 16, 2025
08599c1
Fix community support url (#6245)
gwelch-contegix Jan 20, 2025
36db686
Reduce sa rules download retry limit to 5 (#6225)
alyxto Jan 20, 2025
746915c
fts: change autoindex to occur on mailboxes of receiving 20 or more m…
DerLinkman Jan 20, 2025
4708b13
update.sh: fix mailcow fts update versioning
DerLinkman Jan 20, 2025
ee7a862
chore(deps): update actions/stale action to v9.1.0 (#6247)
renovate[bot] Jan 21, 2025
7bcd61e
[Nginx] Generate includes for custom configs
FreddleSpl0it Jan 22, 2025
1fca328
[Nginx] Disable IPv6 listener for Rspamd dynmaps when DISABLE_IPv6=y
FreddleSpl0it Jan 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: ❓ Community-driven support (Free)
url: https://docs.mailcow.email/#get-support
url: https://docs.mailcow.email/#community-support-and-chat
about: Please use the community forum for questions or assistance
- name: 🔥 Premium Support (Paid)
url: https://www.servercow.de/mailcow?lang=en#support
Expand Down
6 changes: 0 additions & 6 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
"data\/web\/inc\/lib\/vendor\/**"
],
"regexManagers": [
{
"fileMatch": ["^helper-scripts\/nextcloud.sh$"],
"matchStrings": [
"#\\srenovate:\\sdatasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?( extractVersion=(?<extractVersion>.*?))?\\s.*?_VERSION=(?<currentValue>.*)"
]
},
{
"fileMatch": ["(^|/)Dockerfile[^/]*$"],
"matchStrings": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/close_old_issues_and_prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
pull-requests: write
steps:
- name: Mark/Close Stale Issues and Pull Requests 🗑️
uses: actions/stale@v9.0.0
uses: actions/stale@v9.1.0
with:
repo-token: ${{ secrets.STALE_ACTION_PAT }}
days-before-stale: 60
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/image_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
- "postfix-mailcow"
- "rspamd-mailcow"
- "sogo-mailcow"
- "solr-mailcow"
- "unbound-mailcow"
- "watchdog-mailcow"
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ data/conf/dovecot/sni.conf
data/conf/dovecot/sogo-sso.conf
data/conf/dovecot/sogo_trusted_ip.conf
data/conf/dovecot/sql
data/conf/dovecot/conf.d/fts.conf
data/conf/nextcloud-*.bak
data/conf/nginx/*.active
data/conf/nginx/*.bak
Expand Down
1 change: 0 additions & 1 deletion data/Dockerfiles/dovecot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ RUN addgroup -g 5000 vmail \
dovecot-submissiond \
dovecot-pigeonhole-plugin \
dovecot-pop3d \
dovecot-fts-solr \
dovecot-fts-flatcurve \
&& arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$arch" \
Expand Down
71 changes: 15 additions & 56 deletions data/Dockerfiles/dovecot/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,16 @@ EOF

echo -n ${ACL_ANYONE} > /etc/dovecot/acl_anyone

if [[ "${FLATCURVE_EXPERIMENTAL}" =~ ^([yY][eE][sS]|[yY]) ]]; then
echo -e "\e[33mActivating Flatcurve as FTS Backend...\e[0m"
echo -e "\e[33mDepending on your previous setup a full reindex might be needed... \e[0m"
echo -e "\e[34mVisit https://docs.mailcow.email/manual-guides/Dovecot/u_e-dovecot-fts/#fts-related-dovecot-commands to learn how to reindex\e[0m"
echo -n 'quota acl zlib mail_crypt mail_crypt_acl mail_log notify fts fts_flatcurve listescape replication lazy_expunge' > /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_flatcurve listescape replication' > /etc/dovecot/mail_plugins_imap
echo -n 'quota sieve acl zlib mail_crypt mail_crypt_acl fts fts_flatcurve notify listescape replication' > /etc/dovecot/mail_plugins_lmtp
elif [[ "${SKIP_SOLR}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
if [[ "${SKIP_FTS}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
echo -e "\e[33mDetecting SKIP_FTS=y... not enabling Flatcurve (FTS) then...\e[0m"
echo -n 'quota acl zlib mail_crypt mail_crypt_acl mail_log notify listescape replication lazy_expunge' > /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 sieve acl zlib mail_crypt mail_crypt_acl notify listescape replication' > /etc/dovecot/mail_plugins_lmtp
else
echo -n 'quota acl zlib mail_crypt mail_crypt_acl mail_log notify fts fts_solr listescape replication lazy_expunge' > /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 sieve acl zlib mail_crypt mail_crypt_acl fts fts_solr notify listescape replication' > /etc/dovecot/mail_plugins_lmtp
echo -e "\e[32mDetecting SKIP_FTS=n... enabling Flatcurve (FTS)\e[0m"
echo -n 'quota acl zlib mail_crypt mail_crypt_acl mail_log notify fts fts_flatcurve listescape replication lazy_expunge' > /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_flatcurve listescape replication' > /etc/dovecot/mail_plugins_imap
echo -n 'quota sieve acl zlib mail_crypt mail_crypt_acl fts fts_flatcurve notify listescape replication' > /etc/dovecot/mail_plugins_lmtp
fi
chmod 644 /etc/dovecot/mail_plugins /etc/dovecot/mail_plugins_imap /etc/dovecot/mail_plugins_lmtp /templates/quarantine.tpl

Expand Down Expand Up @@ -247,51 +242,6 @@ function script_deinit()
end
EOF

# Temporarily set FTS depending on user choice inside mailcow.conf. Will be removed as soon as Solr is dropped
if [[ "${FLATCURVE_EXPERIMENTAL}" =~ ^([yY][eE][sS]|[yY])$ ]]; then
cat <<EOF > /etc/dovecot/conf.d/fts.conf
# Autogenerated by mailcow
plugin {
fts_autoindex = yes
fts_autoindex_exclude = \Junk
fts_autoindex_exclude2 = \Trash
fts = flatcurve

# Maximum term length can be set via the 'maxlen' argument (maxlen is
# specified in bytes, not number of UTF-8 characters)
fts_tokenizer_email_address = maxlen=100
fts_tokenizer_generic = algorithm=simple maxlen=30

# These are not flatcurve settings, but required for Dovecot FTS. See
# Dovecot FTS Configuration link above for further information.
fts_languages = en es de
fts_tokenizers = generic email-address

# OPTIONAL: Recommended default FTS core configuration
fts_filters = normalizer-icu snowball stopwords
fts_filters_en = lowercase snowball english-possessive stopwords
}
EOF
elif [[ ! "${SKIP_SOLR}" =~ ^([yY][eE][sS]|[yY])$ ]]; then
cat <<EOF > /etc/dovecot/conf.d/fts.conf
# Autogenerated by mailcow
plugin {
fts = solr
fts_autoindex = yes
fts_autoindex_exclude = \Junk
fts_autoindex_exclude2 = \Trash
fts_solr = url=http://solr:8983/solr/dovecot-fts/

fts_tokenizers = generic email-address
fts_tokenizer_generic = algorithm=simple

fts_filters = normalizer-icu snowball stopwords
fts_filters_en = lowercase snowball english-possessive stopwords
}
EOF
fi


# Replace patterns in app-passdb.lua
sed -i "s/__DBUSER__/${DBUSER}/g" /etc/dovecot/lua/passwd-verify.lua
sed -i "s/__DBPASS__/${DBPASS}/g" /etc/dovecot/lua/passwd-verify.lua
Expand Down Expand Up @@ -398,6 +348,15 @@ mail_replica = tcp:${MAILCOW_REPLICA_IP}:${DOVEADM_REPLICA_PORT}
EOF
fi

# Setting variables for indexer-worker inside fts.conf automatically according to mailcow.conf settings
if [[ "${SKIP_FTS}" =~ ^([nN][oO]|[nN])+$ ]]; then
echo -e "\e[94mConfiguring FTS Settings...\e[0m"
echo -e "\e[94mSetting FTS Memory Limit (per process) to ${FTS_HEAP} MB\e[0m"
sed -i "s/vsz_limit\s*=\s*[0-9]*\s*MB*/vsz_limit=${FTS_HEAP} MB/" /etc/dovecot/conf.d/fts.conf
echo -e "\e[94mSetting FTS Process Limit to ${FTS_PROCS}\e[0m"
sed -i "s/process_limit\s*=\s*[0-9]*/process_limit=${FTS_PROCS}/" /etc/dovecot/conf.d/fts.conf
fi

# 401 is user dovecot
if [[ ! -s /mail_crypt/ecprivkey.pem || ! -s /mail_crypt/ecpubkey.pem ]]; then
openssl ecparam -name prime256v1 -genkey | openssl pkey -out /mail_crypt/ecprivkey.pem
Expand Down
4 changes: 2 additions & 2 deletions data/Dockerfiles/dovecot/optimize-fts.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if [[ "${SKIP_SOLR}" =~ ^([yY][eE][sS]|[yY])+$ && ! "${FLATCURVE_EXPERIMENTAL}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
if [[ "${SKIP_FTS}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
exit 0
else
doveadm fts optimize -A
fi
fi
2 changes: 1 addition & 1 deletion data/Dockerfiles/dovecot/sa-rules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else
fi

# Deploy
if curl --connect-timeout 15 --retry 10 --max-time 30 https://www.spamassassin.heinlein-support.de/$(dig txt 1.4.3.spamassassin.heinlein-support.de +short | tr -d '"' | tr -dc '0-9').tar.gz --output /tmp/sa-rules-heinlein.tar.gz; then
if curl --connect-timeout 15 --retry 5 --max-time 30 https://www.spamassassin.heinlein-support.de/$(dig txt 1.4.3.spamassassin.heinlein-support.de +short | tr -d '"' | tr -dc '0-9').tar.gz --output /tmp/sa-rules-heinlein.tar.gz; then
if gzip -t /tmp/sa-rules-heinlein.tar.gz; then
tar xfvz /tmp/sa-rules-heinlein.tar.gz -C /tmp/sa-rules-heinlein
cat /tmp/sa-rules-heinlein/*cf > /etc/rspamd/custom/sa-rules
Expand Down
34 changes: 27 additions & 7 deletions data/Dockerfiles/nginx/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@
import subprocess
from jinja2 import Environment, FileSystemLoader

def includes_conf(env, template_vars):
server_name = "server_name.active"
listen_plain = "listen_plain.active"
listen_ssl = "listen_ssl.active"

server_name_config = f"server_name {template_vars['MAILCOW_HOSTNAME']} autodiscover.* autoconfig.* {template_vars['ADDITIONAL_SERVER_NAMES']};"
listen_plain_config = f"listen {template_vars['HTTP_PORT']};"
listen_ssl_config = f"listen {template_vars['HTTPS_PORT']};"
if not template_vars['DISABLE_IPv6']:
listen_plain_config += f"\nlisten [::]:{template_vars['HTTP_PORT']};"
listen_ssl_config += f"\nlisten [::]:{template_vars['HTTPS_PORT']} ssl;"
listen_ssl_config += "\nhttp2 on;"

with open(f"/etc/nginx/conf.d/{server_name}", "w") as f:
f.write(server_name_config)

with open(f"/etc/nginx/conf.d/{listen_plain}", "w") as f:
f.write(listen_plain_config)

with open(f"/etc/nginx/conf.d/{listen_ssl}", "w") as f:
f.write(listen_ssl_config)

def sites_default_conf(env, template_vars):
config_name = "sites-default.conf"
Expand All @@ -20,8 +41,9 @@ def nginx_conf(env, template_vars):
f.write(config)

def prepare_template_vars():
ipv4_network = os.getenv("IPV4_NETWORK", "172.22.1")
template_vars = {
'IPV4_NETWORK': os.getenv("IPV4_NETWORK", "172.22.1"),
'IPV4_NETWORK': ipv4_network,
'TRUSTED_NETWORK': os.getenv("TRUSTED_NETWORK", False),
'SKIP_RSPAMD': os.getenv("SKIP_RSPAMD", "n").lower() in ("y", "yes"),
'SKIP_SOGO': os.getenv("SKIP_SOGO", "n").lower() in ("y", "yes"),
Expand All @@ -30,9 +52,10 @@ def prepare_template_vars():
'ADDITIONAL_SERVER_NAMES': os.getenv("ADDITIONAL_SERVER_NAMES", "").replace(',', ' '),
'HTTP_PORT': os.getenv("HTTP_PORT", "80"),
'HTTPS_PORT': os.getenv("HTTPS_PORT", "443"),
'SOGOHOST': os.getenv("SOGOHOST", "sogo-mailcow"),
'SOGOHOST': os.getenv("SOGOHOST", ipv4_network + ".248"),
'RSPAMDHOST': os.getenv("RSPAMDHOST", "rspamd-mailcow"),
'PHPFPMHOST': os.getenv("PHPFPMHOST", "php-fpm-mailcow"),
'DISABLE_IPv6': os.getenv("DISABLE_IPv6", "n").lower() in ("y", "yes"),
}

ssl_dir = '/etc/ssl/mail/'
Expand All @@ -59,17 +82,14 @@ def prepare_template_vars():
return template_vars

def main():
env = Environment(loader=FileSystemLoader('./etc/nginx/conf.d'))
env = Environment(loader=FileSystemLoader('./etc/nginx/conf.d/templates'))

# Render config
print("Render config")
template_vars = prepare_template_vars()
sites_default_conf(env, template_vars)
nginx_conf(env, template_vars)

# Validate config
print("Validate config")
subprocess.run(["nginx", "-qt"])
includes_conf(env, template_vars)


if __name__ == "__main__":
Expand Down
8 changes: 4 additions & 4 deletions data/Dockerfiles/nginx/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh

until ping ${REDISHOST} -c1 > /dev/null; do
echo "Waiting for Redis..."
sleep 1
done
PHPFPMHOST=${PHPFPMHOST:-"php-fpm-mailcow"}
SOGOHOST=${SOGOHOST:-"$IPV4_NETWORK.248"}
RSPAMDHOST=${RSPAMDHOST:-"rspamd-mailcow"}

until ping ${PHPFPMHOST} -c1 > /dev/null; do
echo "Waiting for PHP..."
sleep 1
Expand Down
2 changes: 1 addition & 1 deletion data/Dockerfiles/phpfpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ RUN apk add -U --no-cache autoconf \
--with-webp \
--with-xpm \
--with-avif \
&& docker-php-ext-install -j 4 exif gd gettext intl ldap opcache pcntl pdo pdo_mysql pspell soap sockets sysvsem zip bcmath gmp \
&& docker-php-ext-install -j 4 exif gd gettext intl ldap opcache pcntl pdo pdo_mysql pspell soap sockets zip bcmath gmp \
&& docker-php-ext-configure imap --with-imap --with-imap-ssl \
&& docker-php-ext-install -j 4 imap \
&& curl --silent --show-error https://getcomposer.org/installer | php -- --version=${COMPOSER_VERSION} \
Expand Down
31 changes: 0 additions & 31 deletions data/Dockerfiles/solr/Dockerfile

This file was deleted.

Loading
Loading