Setting sendmail hostname

When I look at the headers for an email sent from my server, it calls my server "server.server.com", and I found out that's because that's what's in my hosts file:

127.0.0.1 server.server.com server localhost.localdomain localhost

Apparently it takes whatever's the first thing in the hosts file, so if I change my hosts file to:

127.0.0.1 www.(mydomain).com server.server.com server localhost.localdomain localhost

then sendmail will use www.mydomain.com.

What is the sendmail setting to pick a different hostname rather than just the first on the list?

(I'm not using a control panel.)

thanks

 

 

 

 

Top