22

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?

AnFi
  • 6,326

2 Answers2

33

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)

AnFi
  • 6,326
0

The issue can be resolved by entering the exchange server and mail router ip and domain information in your /etc/hosts file. See below:

#######mail server

ipofexchangeserver   exchangeservername.domain.local  mailhost

ipofmailrouter       mailrouter mailrouter.domain 

Example:

172.18.18.400    sampleexvs   sampleexvs.samplegroup.com   mailhost

172.18.68.432    mailrouter   mailrouter.samplegroup.net
Patrick Mevzek
  • 10,581
  • 7
  • 35
  • 45