Showing results for 
Search instead for 
Did you mean: 

SMTP Relay Failover Configuration

Go to solution
Rcky Mntere
Regular Advisor

SMTP Relay Failover Configuration

Can the sendmail environment on HPUX 11.11/23/31 be configured to use multiple relays in the event the primary relay fails? How do you set this up?

We have two exchange servers configured in a failover mode (entries from UNIX server /etc/hosts file):

We had a failover in the exchange environment but our unix mail failed to be routed.

Our file contains the entry:
# "Smart" relay host (may be null)

(set as null).

Honored Contributor

Re: SMTP Relay Failover Configuration

Since you aren't using the smarthost feature, Sendmail will try to deliver all outgoing mail directly to destination, whatever it is.

To do that, Sendmail uses DNS MX records to identify the mail server(s) of the destination domain.

For example: if you're sending mail to, Sendmail will first check for MX records for If no MX records are found, Sendmail will typically see if it can find an A record (IP address) for and connect to it using the SMTP protocol.

There can be multiple MX records for a domain: each record includes a priority value and a fully-qualified domain name of a mail server. Further DNS lookups may be necessary to convert the names to IP addresses.

MX records *cannot* be stored in /etc/hosts: they're one of the reasons why Internet email is very strongly linked to the DNS.

To see the MX records provided for by your DNS environment, run:

nslookup -query=MX

The response should be something like: mail exchanger = 1 mail exchanger = 2

(Of course, that's assuming mailout01a and mailout01b are the servers that are supposed to receive *incoming* SMTP email in your Exchange environment. The name component "mailout" would suggest otherwise.)


If you want to use the smarthost feature, you can specify multiple smarthosts separated by colons, i.e.

or with IP addresses:


Rcky Mntere
Regular Advisor

Re: SMTP Relay Failover Configuration


Thank you. Your response was dead on. i searched multiple docs and man pages but could never find reference to MX records as clear as you have provided. Nor could I find the syntax for multiple specific host entries.