Operating System - HP-UX
1835243 Members
2603 Online
110078 Solutions
New Discussion

Re: sendmail to Exchange without DNS

 
SOLVED
Go to solution
Sharon Bi
Frequent Advisor

sendmail to Exchange without DNS

Daer All,

I am doing some sendmail test on one 715 workstation.

We are not using DNS. So,

1) vi /etc/mail/sendmail.cf
add Dj$w.mydomail.com
2) /etc/mail/sendmail.cw
It contains : localhost, ws001, ws001.mydomain.com three lines.
3) /etc/hosts looks like this:
127.0.0.1 localhost loopback
x.x.x.x ws001.mydomain.com ws001
4) vi /etc/nsswitch.conf : take away all "DNS"

And it works fine on several UNIX workstation. But when I tried to sendmail to exchange server, it doesn't work any more.

( I have added the exchannge server's IP and fully qualified name in /etc/hosts. And I can ping it.)

Do you know how to get this going?

Thanks in advance!
Sharon
5 REPLIES 5
Steven Sim Kok Leong
Honored Contributor

Re: sendmail to Exchange without DNS

Hi,

For my environment, sending an email from my Unix box to the Exchange server is very straight-forward. sendmail.cf is unchanged and I rely on the MX record in the DNS for the Exchange Server to successfully send the email.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Rita C Workman
Honored Contributor

Re: sendmail to Exchange without DNS

I'm no sendmail expert..and DNS is not set up on any UNIX box, our DNS server is the States..but here's mine:

/etc/mail/sendmail.cf (.. no changes to this file)
/etc/mail/sendmail.cw
localhost

(I do not have any .com here)
/etc/nsswitch.conf
/etc/hosts then continue
DNS then return
/etc/resolve.conf
domain
nameserver

Remember, at some point, you have to find a DNS server to forward mail. So if you aren't set up as a Domain Name Server than it has to go out and find the the DNS server your going to use ( with /etc/resolve.conf) and try to resolve where your sending the mail...
double check your work doing nslookups for ip and name, then try doing a sendmail -v and make sure it routes properly..

Hope I didn't leave anything out,
/rcw
Rick Garland
Honored Contributor

Re: sendmail to Exchange without DNS

In the sendmail.cf file is a macro definition for 'Smart Host'. Input the Exchange host name (or IP address) and bounce sendmail.
Sharon Bi
Frequent Advisor

Re: sendmail to Exchange without DNS

Dear all,

I got it going finally. What I did was:

Found out our exchange server is: exchange1
And the ip is y.y.y.y
our domain is mydomain.com

So, I added an entry in the /etc/hosts:
y.y.y.y mydomain.com mydomain

Then I was able to use sendmail to send email to users on exchange users.

Thanks for all the help!
Alan Riggs
Honored Contributor
Solution

Re: sendmail to Exchange without DNS

You should also add the DS macro into your sendmail.cf file. That will enable you to send mail to addresses not in "mydomain.com" so long as they can br recognized/routed from your exchange server. The line would look like:

DSmydomain.com