October 02, 2008

E-mail errors and troubleshooting

Add the MAILTO line to your cron file, if you want an e-mail of errors.

crontab -e
MAILTO=shantanu.oka+fromcronfile@gmail.com

For all other errors/ warnings you can create a forward file

1) create a new file called .forward
vi /root/.forward

2) Enter the email address on the first line in the file.
shantanu.oka+fromforwardfile@gmail.com

3) Save (w) the file and exit (q)
:wq

Now, anytime the ‘root’ user get an email, it will automatically be forwarded to the address you specified in the .forward file.

Click on "Create a filter" link in gmail.
Type shantanu.oka+fromforwardfile@gmail.com in the to: field. root@localhost.localdomain in the from filed. Use the check boxes "delete it" and "never send it to spam". Now these messages are automatically deleted as well as you can read them if there is any issue.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.