forward mail to root
This commit is contained in:
@@ -4,6 +4,10 @@
|
|||||||
#Set the correct mailer fqdn
|
#Set the correct mailer fqdn
|
||||||
echo $(hostname -f) > /etc/mailname
|
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
|
#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
|
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
|
cat /tmp/crontab.temp > /etc/crontab
|
||||||
|
|||||||
Reference in New Issue
Block a user