The FreeBSD Diary
Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link.
Returned mail: Data format error (Sender domain must exist) 4 March 2000
|This article deals with an obscure error message I received when I encountered mail which was being rejected because of a "Sender domain does not exist" problem.
|Here is the message which bounced back to me. Certain bits have been changed to
protect the idiotic.
This problem didn't take me very long to understand the cause. It's right there: "Sender domain must exist". When the mail server receives the message I sent, it checks the return address to verify that the sender domain exists. For some reason, my box was using the wrong domain. I wasn't sure where to change this, but then I remembered how I had split my domain name space into private and public sectors. I checked the zone file which contains my reverse look-ups (i.e. the file that maps IP addresses to host names; see my zone files for an example) and I found the problem there.
In my reverse lookup file, I found this:
20 IN PTR myhost.int.mydomain.org.
Ahhh! There's the problem. When sendmail on my box sends out a message, it looks up the host name for the IP address on which it's running. In this case, the reverse lookup resolves to an internal domain, which nobody can resolve because I don't export that sub-domain (i.e. int.mydomain.org). Note that "int" in this context refers to "internal", not "international".
I changed the above line to:
20 IN PTR myhost.mydomain.org.
...and then I HUP'd named. I then sent out a sample message. It's important to make the destination address somewhere other than yourself In other words, don't send a test messge from your server to your server. That would not be a valid test. I solved this issue by sending a message to my email address at my ISP.
|I remain unconvinced that my actions solved the problem. As part of my testing I
reversed my changes to observe the effect. I couldn't reproduce the problem. I
HUP'd both sendmail and named. I couldn't get the old problem back.
For what it's worth, here is a side-by-side comparison of the before and after headers of my test messages:
It's important to note the change in the above lines. On the left is the before image. The return page contains the hostname of my box. On the right is the after image. It contains the reply-to address which is configured in my mail client. That's interesting. As I said, I tried to do some testing in this area to reproduce the problem but failed. Therefor I'm not sure if my conclusions are 100% accurate or not.
Another possible cause 30 September 2000
|John Conway wrote in with this note:
In short, the host which was sending the mail had to have an IP address associated with it. Before John added the host to his DNS file, nslookup blah.servername.com would have failed.