...
 
Commits (7)
......@@ -26,6 +26,8 @@ if gzip -t /tmp/sa-rules-schaal.tar.gz; then
cat /tmp/sa-rules-schaal/*cf >> /etc/rspamd/custom/sa-rules
fi
sed -i -e 's/\([^\\]\)\$\([^\/]\)/\1\\$\2/g' /etc/rspamd/custom/sa-rules
if [[ "$(cat /etc/rspamd/custom/sa-rules | md5sum | cut -d' ' -f1)" != "${HASH_SA_RULES}" ]]; then
CONTAINER_NAME=rspamd-mailcow
CONTAINER_ID=$(curl --silent --insecure https://dockerapi/containers/json | \
......
......@@ -14,7 +14,6 @@ RUN apt-get update && apt-get install -y \
netcat \
&& apt-key adv --fetch-keys https://rspamd.com/apt-stable/gpg.key \
&& echo "deb [arch=amd64] https://rspamd.com/apt-stable/ $CODENAME main" > /etc/apt/sources.list.d/rspamd.list \
&& echo "deb-src [arch=amd64] https://rspamd.com/apt-stable/ $CODENAME main" >> /etc/apt/sources.list.d/rspamd.list \
&& apt-get update \
&& apt-get --no-install-recommends -y install rspamd \
&& rm -rf /var/lib/apt/lists/* \
......
#!/bin/bash
echo "Waiting for PHP to settle..."
sleep 10
until nc phpfpm 9001 -z; do
echo "Waiting for PHP on port 9001..."
sleep 3
......@@ -21,7 +18,6 @@ touch /etc/rspamd/rspamd.conf.local \
chmod 755 /var/lib/rspamd
addgroup --system --gid 82 www-access
[[ ! -f /etc/rspamd/override.d/worker-controller-password.inc ]] && echo '# Autogenerated by mailcow' > /etc/rspamd/override.d/worker-controller-password.inc
......@@ -42,7 +38,6 @@ fi
chown -R _rspamd:_rspamd /var/lib/rspamd \
/etc/rspamd/local.d \
/etc/rspamd/override.d \
/etc/rspamd/custom \
/etc/rspamd/rspamd.conf.local \
/etc/rspamd/rspamd.conf.override \
/etc/rspamd/plugins.d
......@@ -64,10 +59,10 @@ touch /etc/rspamd/custom/global_mime_from_blacklist.map \
/etc/rspamd/custom/bad_words_de.map
# www-data (82) group needs to write to these files
chown root:root /etc/rspamd/custom/
chmod 0755 /etc/rspamd/custom/
chown -R _rspamd:www-access /etc/rspamd/custom/*
chmod -R 664 /etc/rspamd/custom/*
chown _rspamd:_rspamd /etc/rspamd/custom/
chmod 0755 /etc/rspamd/custom/.
chown -R 82:82 /etc/rspamd/custom/*
chmod 644 -R /etc/rspamd/custom/*
# Run hooks
for file in /hooks/*; do
......
......@@ -6,8 +6,9 @@ collation-server = utf8mb4_unicode_ci
#innodb_file_format = barracuda
#innodb_large_prefix = TRUE
#sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
max_allowed_packet=192M
max-connections=1500
max_allowed_packet = 192M
max-connections = 100
performance_schema = 0
innodb-strict-mode=0
skip-host-cache
skip-name-resolve
......
......@@ -7,3 +7,4 @@ dns {
retransmits = 2;
}
disable_monitoring = true;
full_gc_iters = 1;
......@@ -2,7 +2,7 @@
bind_socket = "*:11445";
allow_update = ["127.0.0.1", "::1"];
# Number of processes to serve this storage (useful for read scaling)
count = 2;
count = 1;
# Backend ("sqlite" or "redis" - default "sqlite")
backend = "redis";
# Hashes storage time (3 months)
......
bind_socket = "*:11333";
task_timeout = 12s;
count = 1;
.include(try=true; priority=20) "$CONFDIR/override.d/worker-normal.custom.inc"
......@@ -235,6 +235,8 @@ function rspamd($_action, $_data = null) {
}
fwrite($map_handle, $map_content . PHP_EOL);
fclose($map_handle);
sleep(1.5);
touch('/rspamd_custom_maps/' . $map);
}
}
catch (Exception $e) {
......
......@@ -243,7 +243,7 @@ function transport($_action, $_data = null) {
}
}
}
$destinations = array_values($destinations);
$destinations = array_values(array_unique($destinations));
if (empty($destinations)) { return false; }
if (isset($next_hop_matches[1])) {
if (in_array($next_hop_clean, $existing_nh)) {
......
......@@ -68,7 +68,7 @@ services:
- clamd
rspamd-mailcow:
image: mailcow/rspamd:1.51
image: mailcow/rspamd:1.54
build: ./data/Dockerfiles/rspamd
stop_grace_period: 30s
depends_on:
......@@ -174,7 +174,7 @@ services:
- sogo
dovecot-mailcow:
image: mailcow/dovecot:1.93
image: mailcow/dovecot:1.94
build: ./data/Dockerfiles/dovecot
dns:
- ${IPV4_NETWORK:-172.22.1}.254
......