From: Art Fore
Date: Thu, 13 Oct 2005 16:09:13 -0700 To: Subject: [SLE] crontab +email I want to run cat/proc/mdstat as root as a cron job once a day and have it email the results to my work email account. Checked crontab -e, etc, but am still very confused. The MAILTO= seems to be only for a user.
If I do a crontab -e
MAILTO= "mylogon@comcast.net" 5 0 * * * cat /proc/mdstat
Will this work? If not, how would I do it or is there any way to send all root email to a real email address? I remember seeing something about this in the installation, but can't find it anymore.
Have also tried mail from the command line and it works to my real email address.
Art
Yes, that should work. It's also possible to have all mail to root go to a real e-mail address (indeed, it's advisable). Edit the file /etc/aliases and add a line like this: root: mylogon@comcast.net Then save, and at the command line run the command `newaliases`. All mail to root will then go to your comcast address.