If you want to change it the best way is by just adding www.mydoman.com to the beginning of the hostname list for 127.0.0.1 as you mentioned. That's the recommended way to fix it. It might be possible to use one of the masquerading features of Sendmail to accomplish this otherwise, but it's a little convoluted. Other than that I dont believe there's a way to force it through configuration.
Colynx, LLC. (http://www.colynx.com)
Providing inexpensive Web, email, DNS hosting, and more. Now offering $8/yr domain registrations. Name your own price for hosting. Hosting should be on YOUR terms.
But when I changed it I started getting error emails from a cron:
awk: /usr/local/SystemStats2/parser.awk:40: warning: escape sequence `\*' treated as plain `*'
every five minutes. That's not some special cron that I made, that's part of fedora core 2 (stable).
There has to be a way to set the hostname, for machines that have multiple hostnames, like mine, like most. So that sendmail can use one hostname like mail.mydoman.com instead of www.mydomain.com, etc.
Originally posted by CretaForce You can make a new sendmail.cf using a sendmail.mc file. There you can choose the hostname you want to be used by sendmail. Read sendmail's documentation for more information.
Thanks, but my question was: "What is the sendmail setting to pick a different hostname rather than just the first on the list?"