Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

and yes, I have

127.0.0.1   localhost myhost.mydomain.eu myhost.domain2.eu localhost.localdomain
127.0.1.1   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 –  AB_ May 9 '13 at 17:32
    
I didn't receive this error at the beginning - It must be that I deleted something from somewhere –  AB_ May 9 '13 at 17:33
    
@Gnouc however sendmail works almost entirely OK –  AB_ May 9 '13 at 17:34
    
"unable to qualify my own domain name (myhost)" - What tool you use to troubleshoot? Ping command? –  cuonglm May 9 '13 at 17:57

3 Answers 3

up vote 10 down vote accepted

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

Reorder your /etc/hosts file entries:

127.0.0.1   localhost localhost.localdomain
127.0.1.1   myhost.mydomain.eu myhost.domain2.eu myhost

It should qualify myhost to myhost.mydomain.eu (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? –  AB_ 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? –  AB_ May 9 '13 at 18:31
    
this works! great. However I had changed 127.0.0.1 localhost localhost.localdomain to 127.0.0.1 localhost myhost.mydomain.eu 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? –  AB_ 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:

127.0.0.1   localhost localhost.localdomain
127.0.1.1   myhost.mydomain.eu myhost.domain2.eu myhost
share|improve this answer

What is wrong?

change it to be:

127.0.0.1   localhost localhost.localdomain
127.0.1.1   myhost.mydomain.eu myhost.domain2.eu 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.