[Rspamd] Slight changes to improve memory usage

[Web] Dirty hack to touch Rspamd maps a second time
master
andryyy 2019-10-30 20:07:58 +01:00
parent a1971f7af8
commit 27de9dbf92
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
9 changed files with 11 additions and 9 deletions

View File

@ -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/* \

View File

@ -18,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
@ -39,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
@ -62,9 +60,9 @@ touch /etc/rspamd/custom/global_mime_from_blacklist.map \
# www-data (82) group needs to write to these files
chown _rspamd:_rspamd /etc/rspamd/custom/
chmod 0755 /etc/rspamd/custom/
chown -R _rspamd:www-access /etc/rspamd/custom/*
chmod -R 664 /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

View File

@ -7,3 +7,4 @@ dns {
retransmits = 2;
}
disable_monitoring = true;
full_gc_iters = 1;

View File

@ -0,0 +1 @@
phishtank_enabled = false;

View File

@ -1,4 +1,4 @@
level = "silent";
level = "info";
type = "console";
systemd = false;
.include "$CONFDIR/logging.inc"

View File

@ -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)

View File

@ -1,3 +1,4 @@
bind_socket = "*:11333";
task_timeout = 12s;
count = 1;
.include(try=true; priority=20) "$CONFDIR/override.d/worker-normal.custom.inc"

View File

@ -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) {

View File

@ -68,7 +68,7 @@ services:
- clamd
rspamd-mailcow:
image: mailcow/rspamd:1.53
image: mailcow/rspamd:1.54
build: ./data/Dockerfiles/rspamd
stop_grace_period: 30s
depends_on: