1751796 Members
5235 Online
108781 Solutions
New Discussion юеВ

my .forward can't work

 
SOLVED
Go to solution
lyndon_1
Occasional Advisor

my .forward can't work

my users .forward can not work. only root can.
I have most of the message about .forward in thsi forums, I did not find the answer.
any idea who has???

The following is my system configuration.

sendmail process is running.

mailx -s "just test" lycc@hotmail.com

I can recieve the mail.

system:/home # grep lyndon /etc/passwd
lyndon:n2nYuDrDHrLnQ:108:20:,,,:/home/lyndon:/usr/bin/sh
system:/home #

system:/home #cat /etc/shells
/sbin/sh
/usr/bin/sh

system:/home #ll
drwxr-xr-x 2 lyndon users 96 Aug 14 05:31 lyndon

nsswitch.conf and resolv.conf correct,and sendmail can send out the message.

system:/home/lyndon #ll
-rw------- 1 lyndon users 25 Aug 14 05:31 .forward

cat .forward
lycc@hotmail.com

but it can not work. sendmail can't send the message to lycc@hotmail.com.

So, I get a idea. I create a alias in /etc/mail/aliases,like this

lyndon : lycc@hotmail.com

Yes, It worked.

So everything is ok,but only users .forward can't work.
any idea please!!!!!!!
dd
13 REPLIES 13
Ceesjan van Hattum
Esteemed Contributor
Solution

Re: my .forward can't work

Your .forward is from lyndon:users (-rw------)
If you do:
ls -la `which sendmail`
it is proberbly form root:mail.

Is sendmail prohibited to read your .forward?
What about chmod a+r .forward ??

Or add yourself into the group mail and
chown lyndon:mail .forward
chmod 640 .forward

Regards,
Ceesjan
Andreas Voss
Honored Contributor

Re: my .forward can't work

Hi,

think .forward has to have execution bit set.
Try chmod 700 .forward

Regards
Tom Maloy
Respected Contributor

Re: my .forward can't work

Check your sendmail configuration file (/etc/mail/sendmail.cf), searching for "Forward" and the permissions of your users .forward files AND the directories that they are in.

Group writable files and directories containing .forward files are a secrity hole.

Looks like your .forward file has the correct permissions, but check the directory.

Tom
Carpe diem!
Joseph C. Denman
Honored Contributor

Re: my .forward can't work

Lyndon,

The .forward file does not need to be executable.

My question would be, can YOU send mail?

Try this:

As root, "su - lyndon"
mailx -s "just test" lycc@hotmail.com

Does this work?

...jcd...
If I had only read the instructions first??
Paula J Frazer-Campbell
Honored Contributor

Re: my .forward can't work

HI

.forward = 644


Paula
If you can spell SysAdmin then you is one - anon
lyndon_1
Occasional Advisor

Re: my .forward can't work

system:/home/lyndon #su - lyndon
For copyright information, see /etc/copyright
$ll -a .forward
-rw------- 1 lyndon users 25 Aug 14 05:31 .forward
$ chmod 644 .forward
$ ll -a .forward
-rw-r--r-- 1 lyndon users 25 Aug 14 05:31 .forward

$ mail lyndon
dd
.
EOT
$

user lyndon still received this mail, this meaning .forward still not work.

so i chmod 777 ,still not work.
dd
lyndon_1
Occasional Advisor

Re: my .forward can't work

Joseph,

system:/home/lyndon #su - lyndon

$ mailx -s "Just a test" lycc@hotmail.com
tt
.
EOT

Yes, It worked, I can receive the mail from lycc@hotmail.com

dd
lyndon_1
Occasional Advisor

Re: my .forward can't work

Ceesjan,

My sendmail belong to root group, so I change the lyndon's .forward file to root group
like this:

-rw-r--r-- 1 lyndon root 25 Aug 14 05:31 .forward

It still can not work.
dd
lyndon_1
Occasional Advisor

Re: my .forward can't work


Tom,

I have check /etc/mail/sendmail.cf, .forward file is in the users $HOME.
Then you said chech the directory, which directory?


dd