
The idea here is to run:
% ./check-hostname.sh
It tries to determine the host's fully qualified domain name, going thru the
same steps sendmail does. It stops and reports success if it determines the
fully qualified host name; otherwise it suggests how to configure the system
correctly.
Download the shell script.