From d1d63188628b58273f2726a51fa8befceb4327fb Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Sat, 8 Jan 2022 09:11:48 -0500 Subject: [PATCH] Set systemd journald log retention to 10 days (from no limit) to reduce disk usage --- CHANGELOG.md | 1 + setup/system.sh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d450cf97..81dedc83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ Control panel: Other: +* Set systemd journald log retention to 10 days (from no limit) to reduce disk usage. * Fixed log processing for submission lines that have a sasl_sender or other extra information. Version 55 (October 18, 2021) diff --git a/setup/system.sh b/setup/system.sh index ed399ba0..036fe3f9 100755 --- a/setup/system.sh +++ b/setup/system.sh @@ -75,6 +75,13 @@ then fi fi +# ### Set log retention policy. + +# Set the systemd journal log retention from infinite to 10 days, +# since over time the logs take up a large amount of space. +# (See https://discourse.mailinabox.email/t/journalctl-reclaim-space-on-small-mailinabox/6728/11.) +tools/editconf.py /etc/systemd/journald.conf MaxRetentionSec=10day + # ### Add PPAs. # We install some non-standard Ubuntu packages maintained by other