Showing results for 
Search instead for 
Did you mean: 

Exchange/Sendmail Configuration Problem

David Karakas
Occasional Contributor

Exchange/Sendmail Configuration Problem

I want to set up a HP box to route all outbound mail to an exchange server that has access to the public internet. I also want to set up the exchange server to receive the HP boxes mail (via DNS MX) and route it to the HP box. The goal here is to allow bi-directional e-mail to/from the public internet that goes through the exchange server.

Currently, I have relaying mail to and this works quite well. This was accomplished using the DS macro in the file.

I have a public DNS server with the following: IN A
MX 10 IN A


When mail is sent to the originating mail server does a nslookup and discovers the MX record and correctly forwards the mail to Now having received the mail performs its own nslookup for, discovers the MX record and forwards the mail to itself in a loop until ttl kills it. Exchange doesn't seem to know what its hostname is.

I believe that the HP sendmail is configured correctly. What do I have to do to get exchange to do what we intend?

On exchange we have tried putting in the ip address to forward to but it reconstructs the To: header and changes it to user@ipnumber instead of user@fqdn. This causes sendmail to reject it.

Please only answer this if you have successfully performed the same type of environment. I have already received many well intentioned but wrong suggestions.

Rita C Workman
Honored Contributor

Re: Exchange/Sendmail Configuration Problem

Boy this is complex...I found this on another list and thought I'd pass it on. Maybe it will help,*************************************
I have installed sendmail 8.10 on our HP9000 running HPUX 11.00, we are
> connected to internet via a router and we use MS-Exchange server as a
> local mail server.
> I need sendmail to get our messages from our internet
> provider and send them to MS-Exchange server. the same for
> outgoing messages. Does anyone have any ideas?

This is really more of a DNS and specifically a MX problem.

I infer port 25 is open and NATing thru the router to the HP
box -- the HP box is handing off to the NT running Exchange,

( internet ) --- /NAT router/ ------+---port 25-- /HP/
routable IP | |
| |
| -- /NT/

Set the external DNS lowest MX for the HP sendmail box. Set
the internal DNS MX to 10 for the NT Exchange, and 20 for the
HP. Set the ACCESS file for the HP to RELAY your internal and
external domain names.

... External mail will deliver to the HP
... the HP will relay external mail to the NT

... Internal mail will be offered first to the NT, and the HP
will act as a backup.
Rick Garland
Honored Contributor

Re: Exchange/Sendmail Configuration Problem

Adjust the MX records so that the Exchange server has a lower number than the HP. This will tell DNS that exchange is first in priority.
Example, Exchange has an MX of 10, HP has an MX of 20
David Karakas
Occasional Contributor

Re: Exchange/Sendmail Configuration Problem

As it turns out, the HP's were configured correctly. The changes that needed to be applied were at the MS Exchange end. We already had DNS MX records indicating the Exchange server managed mail for

Here's what we had to do in Exchange.

"I have Exchange set up to reroute mail for to What stops a loop is that I then set up a smarthost entry stating than any mail for is to be sent to the host at ###.###.###.###"

Thanks for all the suggestions.
Shannon Petry
Honored Contributor

Re: Exchange/Sendmail Configuration Problem

Read the post and saw you fixed your own problem. Just wanted to note though that in your example DNS records, the machine/domain was not using a trailing dot.
MX 10
should really be
MX 10
It may be just your example, but if not most apps bomb, even though it is not visible. "dig" dies a nice job of showing errors, as well as the DNS servers syslog.

Microsoft. When do you want a virus today?

Re: Exchange/Sendmail Configuration Problem

We have a similar situation here, with the exception that we have 5 HPUX servers that I would like to have bi-directional mail communications with. Would your solution be applicable to this environment, also?

Thanks, Wayne
To ask for help is not a sign of ignorance or incapability; it is a sign of wisdom, maturity, and competence. -Dave Packard