Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

Sendmail relaying to Exchange 2000

Darren Gaile
Advisor

Sendmail relaying to Exchange 2000

All,

I know I'm asking a question that has been asked many times before but the solutions that have been posted do not fix my particular problem. Basiclly, on a new HP-UX 11.11 B installation, I cannot get Sendmail to relay external mail to an Exchange 2000 box.

I have already done the obvious settings in the sendmail.cf file.

1. Added domain name to dj macro
2. Added exchange box to ds macro

We do not use DNS for our unix box so there is no /etc/resolv.conf and I have ensured that both the Exhange server and the unix box itself are listed in /etc/hosts and that service.switch contains

hosts files
aliases files

No matter what I try, when I run

sendmail -v user@domain.com

I get

WARNING: local host name (belf02) is not qualified; fix $j in config file

User@domain.com... domain.com: Name server timeout

User@domain.com... Transient parse error -- message queued for future delivery

Has onyone seen this before or know what may be causing it. All help welcome.
15 REPLIES
Geoff Wild
Honored Contributor

Re: Sendmail relaying to Exchange 2000

How about adding the domain name to the DM macro?

Also, do you have FQDN in /etc/hosts?

Did you restart sendmail after modifying sendmail.cf?

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.
Darren Gaile
Advisor

Re: Sendmail relaying to Exchange 2000

I stop and start sendmail after every change.

Tried adding the domain to the DM macro. Still no joy.

Some entries in /etc/hosts use FQDNs and some don't. The exchange server entry does.



Geoff Wild
Honored Contributor

Re: Sendmail relaying to Exchange 2000

Is the local host (the one with sendmail) FQDN in /etc/hosts?

Also - what version of sendmail?

echo \$Z | /usr/sbin/sendmail -bt -d |grep Version



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.
Darren Gaile
Advisor

Re: Sendmail relaying to Exchange 2000

I'm running sendmail version 8.9.3.

I've tried using the loaclhost with and without a FQDN in /etc/hosts without any difference.
Steven E. Protter
Exalted Contributor

Re: Sendmail relaying to Exchange 2000

The problem is most likely on the exchange server.

It needs to be explicitly set up to relay from your Linux box, probably by IP address.

If you are responsible for this box you might want to do a post in the microsoft forum But your results appear to show a rejection of relay.

mailq should show your outbound mail queued up and not delivered.

sendmail -v -q should confirm that conclusion.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Thayanidhi
Honored Contributor

Re: Sendmail relaying to Exchange 2000

Check /etc/nsswitch.conf and make sure hosts uses files only, not DNS.
Then simply try to resolve the FQDN's using nslookup.
If it resolves properly, test sendmail now.

Revert

TT
Attitude (not aptitude) determines altitude.
Geoff Wild
Honored Contributor

Re: Sendmail relaying to Exchange 2000

You also might want to try upgrading sendmail:

http://www.software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=SMAIL811

Can you post the actual lines from sendmail.cf

Dj
DS

As well as the lines from /etc/hosts for your server and exchange server?


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.
Darren Gaile
Advisor

Re: Sendmail relaying to Exchange 2000

I have already set up the exchange server to accept mail relayed from the sendmail boxes IP address.

The sendmail box currently has a number of mails queued for delivery.

/etc/nsswitch has the following line

hosts files

using nslookup, I can successfuly resolve the FQDN of the exchange server.

The following lines are taken from my sendmail.cf file

Djeurope.cskcorp.com
DSukbfex01.europe.cskcorp.com

the following lines are taken from /etc/hosts

192.0.0.3 belf02.europe.cskcorp.com
192.0.0.6 ukbfex01.europe.cskcorp.com

The hosts file on the exchange box is empty as it uses DNS. I've noticed on the DNS server that there is no entry for the sendmail box.
Geoff Wild
Honored Contributor

Re: Sendmail relaying to Exchange 2000

Looks okay - let us try this, in /etc/hosts:

192.0.0.3 belf02 belf02.europe.cskcorp.com
192.0.0.6 ukbfex01 ukbfex01.europe.cskcorp.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.
Darren Gaile
Advisor

Re: Sendmail relaying to Exchange 2000

Geoff, thanks for all the sugestions.

Still no joy. Still getting exactly the same message when I run

sendmail -v
Darren Gaile
Advisor

Re: Sendmail relaying to Exchange 2000

Just discoverd something else.

If I run

$nsquery hosts ukbfex01

or

$nsquery hosts ukbfex01.europe.cskcorp.com

I get the following.

No policy for hosts in nsswitch.conf.
Using "dns [NOTFOUND=return TRYAGAIN=return] nis [NOTFOUND=return] files" for th
e hosts policy.

Searching dns for ukbfex01.europe.cskcorp.com
This Name Service is currently unavailable

Switch configuration: Allows fallback

Searching nis for ukbfex01.europe.cskcorp.com
This Name Service is currently unavailable

Switch configuration: Allows fallback

Searching /etc/hosts for ukbfex01.europe.cskcorp.com
Hostname: ukbfex01
Aliases: ukbfex01.europe.cskcorp.com
Address: 192.0.0.6
Switch configuration: Terminates Search

The first lines states that there is no policy for Hosts in nsswitch.conf and tries to lookup via DNS.

yet in /etc/nsswitch.conf, the following lines exists.

hosts files
Geoff Wild
Honored Contributor

Re: Sendmail relaying to Exchange 2000

Should be:

hosts: files [NOTFOUND=CONTINUE] dns

Or something like that - for no DNS:

hosts: files


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.
Darren Gaile
Advisor

Re: Sendmail relaying to Exchange 2000

All,

I've just solved my problem in the last line of my previous post.

hosts files

should be

hosts: files

Tried, tested and it works.

Thanks to everyone for you input. It was very much appreciated.
Darren Gaile
Advisor

Re: Sendmail relaying to Exchange 2000

You beat me to the punch by 3 seconds there Geoff.

Thanks again for your help.
Geoff Wild
Honored Contributor

Re: Sendmail relaying to Exchange 2000

Darren - cool - glad that solved it!

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.