Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

and yes, I have   localhost localhost.localdomain   myhost

in hosts file. What is wrong? Sendmail started to put this error into log.

May 9 19:08:54 myhost sm-mta[17103]: unable to qualify my own domain name (myhost) -- using short name

Is this configuration OK?

share|improve this question

closed as not a real question by Ward, Scott Pack, Jenny D, Tom O'Connor, gWaldo May 15 '13 at 13:08

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

What is "this error"? – cuonglm May 9 '13 at 17:29
unable to qualify my own domain name (myhost) — using short name – tinky_winky May 9 '13 at 17:32
I didn't receive this error at the beginning - It must be that I deleted something from somewhere – tinky_winky May 9 '13 at 17:33
@Gnouc however sendmail works almost entirely OK – tinky_winky May 9 '13 at 17:34
This question and its answer were exactly what I was looking for, so it should be reopened. The title states the question correctly. The body text asks whether the answer lies in modifying /etc/hosts, and if so, how. The answer makes it clear that this is indeed the case. The body text could be cleared up a little. – reinierpost Oct 7 at 11:00

3 Answers 3

up vote 13 down vote accepted

Sendmail: short host name to FQDN via /etc/hosts entry

Reorder your /etc/hosts file entries:   localhost localhost.localdomain myhost

It should qualify myhost to (the leftmost name in /etc/hosts line with myhost)

share|improve this answer
what about localhost? might be after this? why? what are the rules? – tinky_winky May 9 '13 at 18:19
@Andzrej A.Filip really this way? I have seen many configuration but not this one, can you say anything about it? – tinky_winky May 9 '13 at 18:31
this works! great. However I had changed localhost localhost.localdomain to localhost before because my SMTP has introduced himself as localhost.localdomain : I am afraid this problem will come back now. What do you think about it? – tinky_winky May 9 '13 at 18:38
If you want to change how your SMTP server announces itself change the $j macro as described here – adamo May 9 '13 at 18:42
As I understand when sendmail uses /etc/hosts file to get Fully Quallified Domain Name (FQDN) it gets leftmost name from line with the short host name. – Andrzej A. Filip May 9 '13 at 18:44

change it to be:   localhost localhost.localdomain myhost
share|improve this answer

What is wrong?

change it to be:   localhost localhost.localdomain myhost

the first from the left i line with hostname o staken to EHLO)

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.