wrong /etc/hosts setup in ix-hostname
I think the /etc/hosts setup (as done in /etc/rc.d/ix-hostname) is currently "broken".
In ix-hostname the hosts file gets copied from base to /etc/hosts, containing one line to resolve 127.0.0.1. After that a line with the user supplied hostname and domain ist appended to /etc/hosts.
Now there are two lines resolving 127.0.0.1, but only the one copied with the base version of the hosts file matches:
127.0.0.1 localhost localhost.my.domain freenas freenas.local
127.0.0.1 $hostname $hostname.$domain
I'm very new to [[FreeBSD]] and [[FreeNAS]], so sorry if this is kind of bullshit ;)
#2 Updated by tj45 - over 6 years ago
I noticed this when i send a test mail from the webinterface. My smtpd rejected the mail because in the ehlo [[FreeNAS]] send "localhost.my.domain" as hostname.
The used smtplib in python tries to resolve the hostname by calling socket.getfqdn(localhost) r1, which resolves the first entry of /etc/hosts as hostname, which is (as i thought) wrong, because i supplied a hostname and a domain.
r1 Line 259: http://hg.python.org/cpython/file/2.7/Lib/smtplib.py