From d955b402cd26c486517c21f49546017f57eee45a Mon Sep 17 00:00:00 2001 From: Thomas de Roo Date: Fri, 21 Jul 2023 10:39:10 +0200 Subject: [PATCH] forward mail to root --- DebianTweaks.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DebianTweaks.sh b/DebianTweaks.sh index 6d53cbf..a10ee21 100755 --- a/DebianTweaks.sh +++ b/DebianTweaks.sh @@ -4,6 +4,10 @@ #Set the correct mailer fqdn echo $(hostname -f) > /etc/mailname +# Forward mail to root +echo root: thomas@de-roo.org >> /etc/aliases +/usr/bin/newaliases + #Add mailto address in crontab awk '/PATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/sbin:\/bin:\/usr\/sbin:\/usr\/bin/ { print; print "MAILTO=thomas@de-roo.org"; next }1' /etc/crontab > /tmp/crontab.temp cat /tmp/crontab.temp > /etc/crontab