How to fix "unable to qualify my own domain name (myhost) -- using short name"?
65,434
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
)
Related videos on Youtube
Author by
AnFi
Updated on September 18, 2022Comments
-
AnFi over 1 year
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?
-
cuonglm about 11 yearsWhat is "this error"?
-
Admin about 11 yearsunable to qualify my own domain name (myhost) — using short name
-
Admin about 11 yearsI didn't receive this error at the beginning - It must be that I deleted something from somewhere
-
Admin about 11 years@Gnouc however sendmail works almost entirely OK
-
Admin about 11 yearsthis is error from mail.err
-
cuonglm about 11 yearsWould you mind posting the error and your sendmail config?
-
Admin about 11 years@Gnouc this is this error, I added to question. (possibly I've just found solution)
-
reinierpost over 8 yearsThis 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.
-
PJ Brunet over 7 yearsIn CentOS 6, this error can be found in /var/log/maillog and the solution (which could be explained better) makes a big difference. I've been working on Dovecot+Postfix+Sendmail for 2 days now and thanks to this crazy question, this is the first time I'm able to email my own server. Goodbye Gmail ;-)
-
-
Admin about 11 yearswhat about localhost? might be after this? why? what are the rules?
-
Admin about 11 years@Andzrej A.Filip really this way? I have seen many configuration but not this one, can you say anything about it?
-
Admin about 11 yearsthis 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?
-
adamo about 11 yearsIf you want to change how your SMTP server announces itself change the $j macro as described here
-
AnFi about 11 yearsAs 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.
-
Admin about 11 yearsI have tested and it looks like indeed myhost.mydomain.eu is taken to introducing themself by my sendmail (I didn't change $j macr but thanks adamo), previously I was listed on Spamhaus due to my SMTP EHLOong as localhost.localdomain. THANK YOU
-
AnFi about 11 yearsIMHO changing $j (solution for sendmail ONLY) should not be be first choice in most situations.