My understanding is that /etc/hosts is only used for the lookup of ip address. The hostname itself is set in /etc/HOSTNAME (on my Slackware boxes) which holds something like machineName.domainName.parentDomain.net, this is read at boot time and used in a call to hostname in one of the scripts that looks something like
/bin/hostname `cat /etc/HOSTNAME | cut -f1 -d .`
Sendmail constructs the from address using the hostname and the username. There would be nothing to stop you (although it would break a few things!) from having no mention of your IP address in /etc/hosts but your hostname itself would still be set.