Warrior Tang (tangaroa) wrote in unixadmin,
Warrior Tang

Name resolution on Solaris 8 + Sendmail

How often do people here ask for help after fixing the problem? This solution has me curious, so here is the story:

We had a problem with Sendmail on Solaris 8 where it would list the From: address in outgoing mail as "user@foo" instead of "user@foo.org". Fixing this was a pain because nothing appeared to be wrong. We ran find|grep searches to be sure every file in /etc with the host name in it was using the full "foo.org", we upgraded libresolver and sendmail to the latest patches available, we added "Dj", "DM" and "Dm" rules specifying "foo.org" to every .cf file in /etc/mail, we tried copying sendmail.cf and submit.cf files from another working system, none of it helped. All the while check-hostname, uname -a, uname -X, and the basic hostname command all reported the host name as the full "foo.org".

What eventually fixed the problem was adding the wrong hostname to the /etc/hosts file. Where it had said: foo.org sun450

We changed it to say: foo.org foo sun450

That seemed to do it. Sendmail is now sending mail From: user@foo.org instead of @foo. This leaves the question of why.

I will pose two sides to the question because there might be two different answers. Why was Sendmail using plain "foo" before when there is nothing on the system to specify a "foo" without a ".org"? And why did sendmail not pick up "foo.org" as the name matched to its external interface until I added just plain "foo" to the hosts file?

Thanks to anybody who could clear this up.
  • Post a new comment


    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.