Just wondering, does the hostname, the actual computer name, does it have to match the domain name? does it have to be the external domain too?

Say your computer name is box10.localdomain.com but you want it to host mail.internetdomain.com, do i name the box mail.internetdomain.com or box10.localdomain.com?

TIA.