Difference between revisions of "Linux"
Josephluis (Talk | contribs) m (Created page with "'''Back to the TOC''' =Administration= =Commands=") |
Josephluis (Talk | contribs) m (→Administration) |
||
Line 1: | Line 1: | ||
'''[[Table of Contents|Back to the TOC]]''' | '''[[Table of Contents|Back to the TOC]]''' | ||
=Administration= | =Administration= | ||
+ | |||
+ | |||
+ | '''''How to set up a Linux email .forward file correctly''''' | ||
+ | |||
+ | ''(by [http://www.eddieoneverything.com/articles/linux-forward-file-not-working-make-sure-you-have-the-permissions-set-correctly.php Eddie])'' | ||
+ | |||
+ | 1. Create a file called “.forward” in your home directory. If your username is “billg”, the file should (likely) be created at “/home/billg/.forward”. Stick the email address you’d like to forward emails to in that file. You can accomplish this quickly from the command line using the command “echo ‘billg@microsoft.com’ > /home/billg/.forward” | ||
+ | |||
+ | 2. After you’ve done this, make sure you set the file so that it’s not world-writeable! (This is the step I overlooked). “chmod 644 /home/billg/.forward” | ||
+ | |||
+ | That’s it – your email should be forwarded correctly. | ||
+ | |||
+ | The reason it doesn’t work when the permissions aren’t set correctly is a security thing – just imagine the risks if anyone was able to write to your .forward file. As a precaution, the system will ignore the .forward file if it is world writeable.'' | ||
+ | |||
+ | ''Note by Colin: Not only does the file have to have restricted permissions, but the directory containing the file has to have restricted permissions. Sendmail’s log was very helpful in figuring that out.'' | ||
+ | |||
=Commands= | =Commands= |
Revision as of 23:19, 3 January 2013
Administration
How to set up a Linux email .forward file correctly
(by Eddie)
1. Create a file called “.forward” in your home directory. If your username is “billg”, the file should (likely) be created at “/home/billg/.forward”. Stick the email address you’d like to forward emails to in that file. You can accomplish this quickly from the command line using the command “echo ‘billg@microsoft.com’ > /home/billg/.forward”
2. After you’ve done this, make sure you set the file so that it’s not world-writeable! (This is the step I overlooked). “chmod 644 /home/billg/.forward”
That’s it – your email should be forwarded correctly.
The reason it doesn’t work when the permissions aren’t set correctly is a security thing – just imagine the risks if anyone was able to write to your .forward file. As a precaution, the system will ignore the .forward file if it is world writeable.
Note by Colin: Not only does the file have to have restricted permissions, but the directory containing the file has to have restricted permissions. Sendmail’s log was very helpful in figuring that out.