1836475 Members
2250 Online
110101 Solutions
New Discussion

Re: SENDMAIL

 
Chris Chaoman
Occasional Contributor

SENDMAIL

How do I change the destination of an email server on and HP9000 server (hp-ux11.0). I cannot find it in any of the usual comms file, /etc/hosts or in /etc/mail.
3 REPLIES 3
Geoff Wild
Honored Contributor

Re: SENDMAIL

In /etc/mail/sendmail.cf

Set the DS macro (Smart Relay) to the server you want to route mail to/through.

If sendmail is running, then restart it after making the change.

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.
Coolmar
Esteemed Contributor

Re: SENDMAIL

You want to modify the sendmail.cf file and change the mail relay (the line that begins with DS). Change that line to your new email server.
Ben Dehner
Trusted Contributor

Re: SENDMAIL

As pointed out by others, add the DS (Smart Relay) option to /etc/mail/sendmail.cf.

However, a warning, unless your HP-UX system has either no DNS or access to a full internet DNS resolver this won't work.

When sending email to an arbitrary address "someone@domain.com", sendmail will first try to do a DNS resolution on "domain.com" to decide if this is an actual host name or an MX mail record. If this DNS lookup fails then sendmail will queue the message without sending it, regardless of the status of the mail relay. After so many retries, sendmail will give up and never send the message. The only way that I've found to avoid this behavior is to disable DNS lookups in /etc/nsswitch.conf.

I discovered this because our HP servers are behind a firewall and only have access to internal DNS, which consists of servers and DHCP data, and does not resolve arbitrary internet A records or other types of data.
Trust me, I know what I'm doing