1758657 Members
2010 Online
108874 Solutions
New Discussion юеВ

Send Mail

 
SOLVED
Go to solution
John Booth_1
Advisor

Send Mail

I have a new exchange box in my enviroment. I didn't set up the send mail on our HP boxes, and have not used it very much. Where would I go to make the chane so that it directs all of the mail messages to the new exchange server?
Thank you in advance.
John
12 REPLIES 12
Patrick Wallek
Honored Contributor

Re: Send Mail

Have a look at the file /etc/rc.config.d/mailservs

In that file there should be a couple of lines like:


export SENDMAIL_SERVER_NAME=mail1

make sure the second line has the name of your mail server in place of whatever is there now (mail1 in this case).

If you do not have both lines, rather you have:

export SENDMAIL_SERVER=1

then you will have to modify your /etc/mail/sendmail.cf file. I am not sendmail expert and do not recall the exact modification that will need to be made if this is the case.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Send Mail

Hi John,

I think I understand what you are asking; I suspect all wee need to do is change the Smart
Relay macro.

1) cd /etc/mail
2) cp sendmail.cf sendmail.cf.sav (in case you are less than perfect)
3) vi sendmail.cf
if you know the hostname of the old mail server, server for that and replace it otherwise look for DSxxxxxx and replace xxxxxx with your new Exchange server hostname and save the file.
4) Make certain that your unix box can resolve the new server's hostname and vice versa.
5) Stop & restart sendmail and you should be done.

Regards, Clay



If it ain't broke, I can fix that.
John Booth_1
Advisor

Re: Send Mail

Well I edited the sendmail file, bu when I go to stop annd start the sendmail service I get this error:

May 30 07:20:37 bway7 sendmail[26331]: unable to qualify my own domain name (bwe

I am not sure why I am getting this error. Do you know if there are anyother files I have to edit other than the /etc/mail/sendmail.cf
someone_4
Honored Contributor

Re: Send Mail

what do you have in the section
# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
John Booth_1
Advisor

Re: Send Mail

This is hat I have in my sendmail. file

# my official domain name
Dj$w.bwaycorp.com
A. Clay Stephenson
Acclaimed Contributor

Re: Send Mail

Okay John,

Since it appears that you are not running DNS,
you need to do I more thing:

I'll assume your unix box's hostname is 'elvis'.

The VERY FIRST entry in /etc/hosts (or the hosts map if NIS) must be a fully qualified host name. You can include the short hostname as an alias on the same line. e.g.

10.1.1.51 elvis.bwaycorp.com elvis

Make sure that you have no '#' in front of the
Dj$w macro definition and that the macro starts
in column 0 (no leading white space).

Ain't sendmail fun? Clay
If it ain't broke, I can fix that.
someone_4
Honored Contributor

Re: Send Mail

Are you using DNS? or did you edit your etc/hosts file? what error does your syslog say?
Here is some info I found.
My official domain name or Fully Qualified Domain Name - FQDN(Dj): This is required only if sendmail cannot automatically determine your domain.If you are not using DNS, and the official host name (ie, the first entry in /etc/hosts following your IP address) is not a fully-qualified host name, then sendmail will have difficulty resolving your domain name. You MUST modify the $j macro by replacing .Foo.COM with your actual domain name. If you do not, you will see a warning message in your syslog, that might even get echo'd to your console when sendmail starts up. For example, if you see this warning:
WARNING: local host name (sys1) is not qualified; fix $j in config file
then you need to uncomment the Dj macro and add your domain.
Change the line: Dj$w.Foo.COM to Dj$w.hp.com
where hp.com would be the name of your domain. Then that warning
message will go away.
John Booth_1
Advisor

Re: Send Mail

This is the las one....I hope! Well my error message went away but I still have this one problem. When I go to /sbin/init.d and try to start and stop send mail I get an error saying:

sendmail start
start... User unknown

And it doesn't start the service. I am logged in as root when I this happens.
A. Clay Stephenson
Acclaimed Contributor

Re: Send Mail

Okay John,

I now think you are trying the execute the sendmail command (/usr/sbin/sendmail) rather than the sendmail rc script (/sbin/init.d/sendmail).

1) cd /sbin/init.d
2) ./sendmail start

Clay
If it ain't broke, I can fix that.