Operating System - HP-UX
1827389 Members
4295 Online
109964 Solutions
New Discussion

smart relay w/ internal dns server

 
someone_4
Honored Contributor

smart relay w/ internal dns server

hi everyone
I have an issue with sendmail using an interal dns server. When I mean internal dns server it is a dns server that only resolves internal hostnames. It does not resolve any external or internet domains.

I have set up the DS macro on server A that is not on the internet to use a relay host server B wich also and hpux box. Server B is on the internet and can resolv internet domains to send email anywhere.

Now on server A. I have /etc/nsswitch.conf set up
hosts: files [NOTFOUND=continue TRYAGAIN=continue] dns
To use the interal dns server. When I try to send an email
sendmail -v richard@mydomain.com
it does not work.
I get
Name server timeout
Transient parse error

On the internal dns I can do an nslookup on server B which I am trying to use as a smart relay server. Everything resolves fine with the interal dns.
Now in nsswitch.conf when I use
hosts: files
it works.

Why is sendmail so set on using the internal dns server to resolve a domain ? Even when I am using a smart relay.

Even with nsswitch.conf set to look at files first it is still looking for the dns server.

How can I get it to use the smart relay. Which is a local host in the internal dns server and in the /etc/hosts file. And still be able to use the interal dns server.

Thanks,
Richard







7 REPLIES 7
Uday_S_Ankolekar
Honored Contributor

Re: smart relay w/ internal dns server


Try cw settings in sendmail.cf. You may want to put local hostnames in sendmail.cw file

-USA..
Good Luck..
Geoff Wild
Honored Contributor

Re: smart relay w/ internal dns server

Name server timeout - means you have an issue with the resolver - not sendmail. Can you do a nslookup mydomain.com on Host A? Check your /etc/resolve.conf file - make sure Host B's ip is in there and domain is set to mydomain.com.

You might also need to set the DM macro in sendmail.cf:

DMmydomain.com

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Uday_S_Ankolekar
Honored Contributor

Re: smart relay w/ internal dns server

Here is few info from Knowledge Base..

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062906182

Goodluck,
-USA..
Good Luck..
someone_4
Honored Contributor

Re: smart relay w/ internal dns server

Ok
here is what I have ..
if i do
sendmail -v richardl@mydomain.com

it does not work if I am using my internal dns server.

Now if i put an entery in /etc/hosts
192.168.10.154 mydomain.com
It works. I can send emamil to richardl@mydomain.com even if i am using the internal dns server. The smart relay works. But now the issue is it does not use the smart relay for other domains.

I still would think that it would use the smart relay for everything.

Richard
Geoff Wild
Honored Contributor

Re: smart relay w/ internal dns server

On your smart relay (DNS) server, you must have all the domains you want to send to configured in DNS and/or have a forwarders statement in your named.conf DNS file.

BTW - did you check the resolv.conf on Host A?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
someone_4
Honored Contributor

Re: smart relay w/ internal dns server

Hello,
I finaly got this to work. I had to force sendmail not to look at dns. Here is how I did it.

In the sendmail.cf in the section marked SMTP Mailer specification I had to change F=mDFMuX like so:

F=mDFMuX
to
F=0mDFMuX

in all 4 parts.

Below is how it looks with the changes:

#####################################
### SMTP Mailer specification ###
#####################################

##### @(#)smtp.m4 8.38 (Berkeley) 5/19/1998 #####

Msmtp, P=[IPC], F=0mDFMuX, S=11/31, R=21, E=\r\n, L=990,
T=DNS/RFC822/SMTP,
A=IPC $h
Mesmtp, P=[IPC], F=0mDFMuXa, S=11/31, R=21, E=\r\n, L=990,
T=DNS/RFC822/SMTP,
A=IPC $h
Msmtp8, P=[IPC], F=0mDFMuX8, S=11/31, R=21, E=\r\n, L=990,
T=DNS/RFC822/SMTP,
A=IPC $h
Mrelay, P=[IPC], F=0mDFMuXa8, S=11/31, R=61, E=\r\n, L=2040,
T=DNS/RFC822/SMTP,
A=IPC $h



###########################


Then I had to comment out



#####################################
# pass to name server to make hostname canonical
R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4

to


#####################################
# pass to name server to make #hostname canonical
R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4



and then it worked.

Richard
someone_4
Honored Contributor

Re: smart relay w/ internal dns server

oppps
on the last part

###########################


Then I had to comment out



#####################################
# pass to name server to make hostname canonical
R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4

to

The statement is commented out.
#####################################
# pass to name server to make hostname canonical
#R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4