Operating System - HP-UX
1833652 Members
4042 Online
110062 Solutions
New Discussion

Re: TryNullMXList and we do not relay message.

 
Rod White
Frequent Advisor

TryNullMXList and we do not relay message.

I'm running 8.8.6 of sendmail with the PHNE_17190 patch.

I have a delegated domain name (mydomain.com) to my HP 11 server (localnode) through a firewall with NAT/PAT.

The name of my domain differs from the local host name.

IP's are resolved first through /etc/hosts then DNS.

localnode and mydomain are included in /etc/mail/sendmail.cw

O TryNullMXList=T is uncommented in /etc/mail/sendmail.cf

When mail from outside the firewall is destined to users at mydomain.com and is received by localnode and mydomain.com is not listed in /etc/hosts, that is, it is resolved via DNS (to the external IP address), then mail is received by sendmail correctly.

When mail from outside the firewall is destined to users at mydomain.com and is received by localnode and mydomain.com is resolved by /etc/hosts (to the localnode IP address) then sendmail returns a "we do not relay" error message to the user sending the mail.

After reading "Installing and Administering Internet Services" I thought that the issue may be due to /etc/hosts not returning an MX record for mydomain.com and DNS returning an MX record. That is, sendmail queries the MX record for mydomain.com before deciding that the mail is local (sendmail.cw). But "O TryNullMXList=T" is already uncommented in /etc/sendmail.cf and so I thought that sendmail should ignore the fact that /etc/hosts does not return an MX record for mydomain.com and would then contact the resolved IP address which was localnode.

Does anyone know if the syntax of TryNullMXList is incorrect or there is some other issue or that I an interpreting the TryNullMXList incorrectly.

Note : sendmail was working fine for at least a year until I added mydomain.com to /etc/hosts last friday. Removing mydomain.com from /etc/hosts corrects the problem.

I need to have mydomain.com resolved to localnode so that software running on local node and referencing mydomain.com resolves locally and not to the outside address of the firewall.

Rod.
2 REPLIES 2
Naveej.K.A
Honored Contributor

Re: TryNullMXList and we do not relay message.

hi rod,

/etc/mail/access
local ip address RELAY

or

domainname RELAY

It seems should solve your problem while using the /etc/hosts for IP resolution

with best wishes
Naveej
practice makes a man perfect!!!
Berlene Herren
Honored Contributor

Re: TryNullMXList and we do not relay message.

Use of the access.db is not available until 8.9.3 (I do suggest you upgrade, as the version you are running has vulnerabilities).

The TryNullMXList tells sendmail to use the A record if a "good" MX record does not exist.

"RFC974 says that when mail is being sent from a host that is an MX record for the receiving host, all MX records of a preference equal to or greater than the sending host must be discarded. In some circumstances this can leave no usable MX records. In this absence, V8 sendmail bases its action on the setting of its TryNullMXList (w) option."

The syntax is
O TryNullMXList=bool (true/false)

Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm