[Rspamd] Slight changes to improve memory usage
[Web] Dirty hack to touch Rspamd maps a second timemaster
parent
a1971f7af8
commit
27de9dbf92
|
@ -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/* \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -7,3 +7,4 @@ dns {
|
|||
retransmits = 2;
|
||||
}
|
||||
disable_monitoring = true;
|
||||
full_gc_iters = 1;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
phishtank_enabled = false;
|
|
@ -1,4 +1,4 @@
|
|||
level = "silent";
|
||||
level = "info";
|
||||
type = "console";
|
||||
systemd = false;
|
||||
.include "$CONFDIR/logging.inc"
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
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) {
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue