Sendmail hang or is very slow when sending an email.
debian sm-mta: My unqualified host name (debian) unknown; sleeping for retry
sendmail is searching for a FQDN ( fully qualified domain name ). In our case the host name is “debian” and that is not a FQDN. To resolve this problem change /etc/hosts:
127.0.0.1 localhost 127.0.1.1 debian
127.0.0.1 localhost.localdomain localhost debian 127.0.1.1 debian
debian is your hostname.