Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User mail won't forward

Status
Not open for further replies.

topher80

Technical User
Mar 21, 2007
6
US
I have set up a user with a .forward. But when a cron job failed it did not forward the mail to my email, instead it went to the user mailbox. Does anyone have any ideas? Thanks.
 
What is the job that failed in the crontab and what relation does it have that user .forward file?
 
I have tested it with several different jobs. One was a check of some logs, and the other was a vmstat job for testing to see if it would fail. I ran the same jobs with a different user and the .forward worked. What situation would cause this particular user's .forward to be ignored? Thanks for your help!
 
Possibly too lax file permissions on .forward file (group/other writable)...


HTH,

p5wizard
 
Yep, the permissions on the users home directory were set to 775. I changed the permissions to 755 and it worked! Setting the mail command to -v "verbose" helps determine problems also. Thanks for you help!
 
Reason it doesn't work with group or other write permission, is that the mail facility can't be sure the file still contains the forwarding address that the owner has put in it, as someone else may have overwritten that address in the file.


HTH,

p5wizard
 
Hi folks,

I was wondering ...
Why not use an alias under /etc/aliases ?

Regards
Thomas
 
A ${HOME}/.forward file makes it possible for mere mortals to setup/alter mail forwarding, without having to bother us SAs. ;-)


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top