forward mail to root

This commit is contained in:
2023-07-21 10:39:10 +02:00
parent 89d82c3e6c
commit d955b402cd

View File

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