?
Solved

forward problem with sendmail

Posted on 2003-02-28
10
Medium Priority
?
513 Views
Last Modified: 2013-12-27
I create a .forward file under one user's directory. It looks like this:
username@domain.com
Then I restart sendmail program, and send test mail. But it seems the Solaris ignores the .forward file. The user still receive email from his previous email address, can't receive from new email address. And I have tested the new email address, it can work. I don't know why. Thank you.
0
Comment
Question by:frog77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +3
10 Comments
 

Expert Comment

by:roy911
ID: 8046416
First of all, you do not have to restart the sendmail daemon when you make changes to or create a new .forward file under a user's home directory. It seems like you have tested sending email to the username@domain.com email address and it works, right ?? Can you send email directly to username@domain.com from the machine you are making changes on ?

regards,

Rahul
0
 
LVL 4

Expert Comment

by:besky
ID: 8047742
What is needed:

version of sendmail, from /var/log/syslog
how is your mailsystem configured,
is /var/mail mounted from a mailhost ?

Can you see any mail forwarded in /var/log/syslog ?

This usually just works, henche the questions
0
 

Author Comment

by:frog77
ID: 8048359
yes, I mounted /var/mail from another mail server, and the version is 8.11.2. I guess the reason may be in file relay-domains. I see some "relaying denied" in log file. Because our mail server has open-relay problem early, I only create two entries in relay-domains file, one is the mail server, another is this mail client. I send test email from another domain, so I guess mail server can not forward this test email to new address. Am I right? How can I solve this problem?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:besky
ID: 8048962
So in that case sendmail is not started on your client.

Relay domains limits the domains from the inside that will be relayed and eventually rewritten by the the mail gateway.

This shouldnt be a problem since the sender of the mail is your internal user, the recipiant address has no bearing on this.

If you try to run a verbose test from sendmail, what happens ?

su - to-the-user-with-the-.forward-file
( or login as the user )
sendmail -v user@domain < "some dummy textfile" ( from the .forward file )

There are normally no limitations on recipiants, therfor the problem must be somewhere else.

One more thing, can you check what actually happens when a mail arrives to the user with the .forward file ?

I guess/hope the protection is ok on the .forward file.

Come back again.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 8055191
check your /etc/mail/sendmail.cf file

do a search on "Forward"

make sure that your seach ".forward" path looks like:

O ForwardPath=$z/.forward:/var/forward/$u

or:
O ForwardPath=$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward
#O ForwardPath=

if your "ForwardPath" is "blank", change it and then restart sendmail.

0
 

Author Comment

by:frog77
ID: 8066071
I try the command sendmail -v user@domain < /dev/null, it says
Host unkown(Name Server: xxx(our mailserver name):host not found)
Cannot open /home/xxx(username)/dead.letter: Persmission denied
Meanwhile, I set the user's home directory and his .forward file to be not group or world writable. Am I right and how can I solve the problem?
0
 
LVL 38

Expert Comment

by:yuzh
ID: 8068691
do a nslookup to check if your box can see your mailserver?

If not, check /etc/resolv.conf file to make sure your have the DNS server infor.



0
 

Author Comment

by:frog77
ID: 8091288
I have DNS server info in resolv.conf. When I check sendmail.cf, I found such a line:
#are group-writable:include:and .forward files (un)trustworthy
#O Unsafe Groupwrites
I changed the user's home directory and his .forward file to be not group or world writable. But I did not find any include files.
And in sun's doc website, it is said increased security on .forward files requires that the default shells (as listed in /etc/passwd) of all users trying to employ a .forward file to forward mail to a program or to a file must be listed in /etc/shells for the file to be accessed.
So shall I change the /etc/shells to make forward work normally? Thank you.
0
 
LVL 18

Expert Comment

by:liddler
ID: 10426015

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ and refund

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0
 

Accepted Solution

by:
amp072397 earned 0 total points
ID: 10464738
PAQed, with points refunded (50)

amp
Community Support Moderator amp~at~experts-exchange.com
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question