Showing results for 
Search instead for 
Did you mean: 

mail relay is denying delivery

Go to solution
John Dixon_5
Occasional Contributor

mail relay is denying delivery

How can I configure sendmail to do its own delivery? Every time our corporate IT make a change on the network (every couple of months) our mail stops delivering to outside addresses. I want to skip the relay and just do the MX lookups and delivery on HP/UX server itself.
Keith Bryson
Honored Contributor

Re: mail relay is denying delivery

Hi John

I assume in the /etc/mail/ you are using a smart relay host (DS record)?

It should just be a case of ensuring that the DS is not set, the DM and Dj variables are correctly set and that you have DNS resolution working (i.e. you have external DNS resolvers set in the /etc/resolv.conf file). You will also need SMTP firewall ports opened (if applicable).

Arse-cover at all costs
Steven E. Protter
Exalted Contributor

Re: mail relay is denying delivery


1) You must be able to resolve DNS on the server. dig or nslookup If you get a valid answer move to the next item. If not, you may need to change /etc/resolv.conf to DNS servers that provide such answers.

2) Take the DS entry out of
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

3) sendmail -v -d8.99 -d38.99
type some text


Does the mail get accepted or is it queued. If its queued, you have more work to do.

Factors to consider:

1) Firewall may not let your IP address use port 25 outbound. If so, you are done unless you can get organization policy changed.

2) If 1) is not a factor, lots of mail systems like aol and mine, won't accept mail from hosts without valid reverse lookup addresses. Also, the actual domain name of the server may need to be resolvable on the public Internet. Otherwise your mail will bounce or go into the bit bucket.

The hostname issue can be resolved with the hostname line in /etc/rc.config.d/netconf or the Dj directive in

There are other factors that can make this a fun and meaningful learning experience.

Steven E Protter
Owner of ISN Corporation
John Dixon_5
Occasional Contributor

Re: mail relay is denying delivery

Thanks to both people who responded to my question. As it turns out, I should have RTFM before posing my question. The man page for sendmail essentailly gave me the options to have sendmail deliver via SMTP. I guessed at removing the setting for the "smart relay" to have it default to deliver for itself. Everything else it seems was already configured properly. Thanks again for pointing me in the right direction and helping me understand all of what I did to get it working.