Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

mail and .forward

SOLVED
Go to solution
Sachin Soni_1
Frequent Advisor

mail and .forward

Hi ,

we are using .forward to forward incoming mails.
it used to work properly but suddenly stopped working.
now it only works for user "root" , for any other user it doesnt work.
mail goes to users mail box, and can be read by mail / mailx, but .forward doesnt works.

any idea , what the problem can be ?


thanks.
N-joy
5 REPLIES
someone_4
Honored Contributor

Re: mail and .forward

what are your permissions on the .forward? They should be 766. Also check if you can send an email to the email you have in the .forward file.
#echo test | sendmail -v email@forwardaddress.com
Alex Glennie
Honored Contributor
Solution

Re: mail and .forward

Each user and root can have a ".forward" file in their home
directory. However, if the owner and permissions on this file is not
set correctly sendmail will disallow execution of ".forward" file.

Also, Sendmail can run programs or write to files using the
".forward" file. This is controlled by the /etc/shells file. If the owner
of the ".forward" file lacks a valid shell as listed in /etc/shells
file, the execution of such programs will be disallowed.

Check the permissions on the ".forward" file. E.g. if the user
"mailman" has a ".forward" file in /home/mailman this user should
have the following permissions on the ".forward" file:

# ll -a /home/mailman/.forward

-rw------- 1 mailman users 20 Aug 4 1999 /home/mailman/.forward

Make sure the owner of the ".forward" file has the valid shell from
/etc/passwd listed in the /etc/shells file. E.g.:


# more /etc/passwd | grep mailman

mailmail:XcsSHS:126:20:TheMailMan,Sendmail
Group,:/home/mailman:/usr/bin/ksh


# vi /etc/shells
/usr/bin/ksh
:wq!

ps also SendMail checks the $HOME directory - as defined in /etc/passwd - for
proper permissions PRIOR to checking for a .forward file. If the
$HOME directory has incorrect 'group writable' permissions that could be your problem also ? -> # chmod 755 /home/ ?
Sridhar Bhaskarla
Honored Contributor

Re: mail and .forward

Hi Sachin,

Check your mail.log. It will give you a good hint about what's happening with your .forward files.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sachin Soni_1
Frequent Advisor

Re: mail and .forward

Hi alex,

i checked , permissions, shells .
everything looks ok.

it used to work properly , suddenly it stopped sending mails.
now it is working only for root user, but not for any other user.

i can send mail out using command line.
i can also read using mailx / mail.


thanks
N-joy
Sachin Soni_1
Frequent Advisor

Re: mail and .forward

Its done,
problem was with home directory permissions.

Thanks to all .

N-joy