Operating System - HP-UX
1834204 Members
2232 Online
110066 Solutions
New Discussion

Using DNS to resolve relay host

 
SOLVED
Go to solution
Luis Toro
Regular Advisor

Using DNS to resolve relay host

We recently had a problem on a relay host that we define using the DS macro on all of our HP-UX servers. Due to the issue I am investigating what options I have in terms of failover to a different relay host. Thanks to this forum, I know I can specify multiple relay hosts in the DS line. However, my Exchange Admin recommends using DNS for my relay host information. In other words, not specify a relay hostname in sendmail.cf. How can I accomplish this in sendmail.cf ?
Relevant info:
- /etc/nsswitch.conf
hosts: files [NOTFOUND = continue] dns
- nslookup set type=MX does yield a hostname when I enter the domain.

Thank you.
4 REPLIES 4
Sanjay_6
Honored Contributor

Re: Using DNS to resolve relay host

Hi Luis,

Define the relay server in the /etc/mail/sendmail.cf file. Define the relay server name and ip address in you local hosts (/etc/hosts) file and use the resolver. That way the system will be able to resolve the relay under all situations. If you want to use a relay, you have to define the same in sendmail.cf file. You can use multiple relay.

Hope this helps.

Regds
Luis Toro
Regular Advisor

Re: Using DNS to resolve relay host

Sanjay,

That is what I'm currently doing, and it is working fine. What the Exchange admin is proposing is to NOT specify a specific host as a relay server, and have the DNS server provide that information. Here's an explanation by example:

Relay host is an NT server:
mailer.mydomain.com

In all of my UNIX servers, I have:
DSmailer # defined in /etc/hosts

nslookup
> set type=MX
> mydomain.com
yields: mailer.mydomain.com ip: 123.456.789.012

Current setup is working. What is being proposed is to remove the reference to "mailer" and have DNS provide the relay server information (not just resolve the hostname, but provide the actual server name to use as a relay host). This way, in case there is a problem on the NT side relaying mail, I do not have to modify sendmail.cf with a different hostname; only DNS would be modified. I hope this clarifies the question.
Thanks
Jordan Bean
Honored Contributor
Solution

Re: Using DNS to resolve relay host

I use DS$m and Sendmail happily asks DNS for the MX hosts (two to date) for the domain name. Watching the mail logs, it has a tendency to alternate between them, but that's okay.
Luis Toro
Regular Advisor

Re: Using DNS to resolve relay host

Thanks.

That seemed to work. Although
since we currently only have one relay host, I can't test any failover, but at least I know what my options are.