As discussed, `hostname -f` is a bad idea.  Since it's not guaranteed to resolve properly (and it doesn't in my experience), it will just break the system - we use this in Via headers, so we must have something that does resolve - IP address is fine.