Author: Steven Neiland
Published:

Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

This is a simple little trick I came across the other day while I was debugging an unrelated issue with my server.

Certain process's will send an email to the root user of a linux server to notify you of an issue, cron for example. However if you are not in the habit of logging into the server on a regular basis this can be a problem if an issue is urgent.

Fortunately it is really easy to forward email destined for the root user to another email (say a postfix mail account). All you need to do is create a file named ".forward" in the "/root/" directory and on the first line enter the email address you want to forward to.

This should work for regular users also, just put the .forward file in their home directory. I don't think it can get any simpler than that.

What Do You Think?

Reader Comments

Post a Comment

Comment Etiquette:

  • Please keep comments on-topic.
  • Please do not post unrelated questions or large chunks of code.
  • Please do not engage in flaming/abusive behaviour.
  • Comments that contain or appear to be advertisments, will not be published.
  • Comments that appear to be created for the purpose of linkbuilding to commercial sites will be removed.

We are all adults here so play nice.

*
*



Archives Blog Listing

Tag Listing

Learn CF In A Week

Treehouse

 
Fork me on GitHub