I have several machines that used to run Ubuntu 10.04. The OS were changed to RHEL7. After the change, programs like cron
and mail
send mail as myuser@myhost.localdomain
whereas on Ubuntu it was myuser@myhost
. I prefer the Ubuntu way, without the localdomain
suffix, and would like my RedHat installs to work the same way. How can I do this?
/etc/hosts
looks like this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
1.2.3.4 myhost.example.com myhost
hostname -f
shows myhost.example.com
; hostname
shows myhost
(all of which seems OK, and the same as on Ubuntu).