Skip to content

Instantly share code, notes, and snippets.

@mschmitt
Last active June 5, 2020 19:32
Show Gist options
  • Save mschmitt/401fe835cdbb8f87650a5a145fa9dca4 to your computer and use it in GitHub Desktop.
Save mschmitt/401fe835cdbb8f87650a5a145fa9dca4 to your computer and use it in GitHub Desktop.
Debian Maillog Cleanup
# „This has mostly historical reasons.“ - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508376
# curl --silent https://gist.githubusercontent.com/mschmitt/401fe835cdbb8f87650a5a145fa9dca4/raw/yolo.sh | bash -x
perl -i.bak -pe 's/^(mail.(info|warn|err))/#$1/' /etc/rsyslog.conf
systemctl restart rsyslog || /etc/init.d/rsyslog restart
rm -vf /var/log/mail.{info,warn,err}*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment