/etc/aliaseson a CentOS 7 system that uses sendmail for transmitting email by adding a new alias, I ran newalises. When I did so, it took a fair amount of time for the command to complete and when it did I saw the error message below:
[root@moonpoint ~]# newaliases WARNING: local host name (moonpoint) is not qualified; see cf/README: WHO AM I? /etc/aliases: 360 aliases, longest 69 bytes, 6301 bytes total [root@moonpoint ~]#
The referenced "cf/README" file is at
I had also noticed that when I entered the mailq command to see what messages were queued for transmission it took a long time to see the results. And whenever I sent email from the system with the email client Alpine, it was taking a long time for email messages to be transmitted.
I timed how long it for the newaliases command to complete with the time command and found it took over a minute.
[root@moonpoint ~]# time newaliases WARNING: local host name (moonpoint) is not qualified; see cf/README: WHO AM I? /etc/aliases: 360 aliases, longest 69 bytes, 6276 bytes total real 1m0.363s user 0m0.074s sys 0m0.078s [root@moonpoint ~]#
I ran the command several times and found that it consistently took over a minute for the command to complete. I also timed how long it took to transmit an email with the mailx command with the time command and found it took about 20 1/2 seconds.
# time mailx -s 'Testing time for email transmission' email@example.com This is a test of how long it takes to send email with mailx. EOT real 0m20.552s user 0m0.004s sys 0m0.034s [root@moonpoint ~]#
I also noted quite a few entries like the following one in
/var/log/maillog because there was no
fully qualified domain name specified for the system:
Jun 4 16:27:19 frostdragon sendmail: My unqualified host name (moonpoint ) unknown; sleeping for retry
Sendmail accepts mail for domains listed in
Getting sendmail to accept email for a domain), but that is not where
you need to make an update for the local host name in this case. I was able to
resolve the problem by using the
The format is
hostnamectl set-hostname fqdn where fqdn
fully qualified domain name, e.g., "myserver.example.com", rather than
just "myserver", if you happened to name your system "myserver" and you
owned the domain name example.com. E.g., for moonpoint.com, I could use a
command like the one below:
[root@moonpoint ~]# hostnamectl set-hostname moonpoint.com [root@moonpoint ~]#
After I entered the appropriate
hostname set-hostname command, I
saw almost instant responses when I issued the mailq command. E.g.,
I saw the times below:
real 0m0.276s user 0m0.038s sys 0m0.077s
And sending email via Alpine and running the newaliases command also produced instant responses afterwards.