With this in mind I've found a simple and fast way to send emails without the needs to touch any system configuration.
Supposing that you want to launch the "ls /" command with the root user, you can write this line:
* * * * * root (echo "Subject: Cron
Within round brackets there's the subject, followed by the output of the command, followed by the recipient.
Simple, fast, secure.
4 comments:
Thanks! Helped me a lot. I had to get command line emailing to work, so I just symlinked sendmail to zimbra's and everything seems to work great so far.
Very clever! Thanks a lot
Here's a more in depth look at the issue and symlink fix.
http://ashtech.net/~syntax/blog/archives/124-Cron-Uses-usrsbinsendmail.html
Thanks! Great idea. I'm using it for auditing a couple logs.
Post a Comment