How to change from xyz.blah.com to blah.com in mail headers
I am trying to set up a Slackware 10.2 install to function as the household IMAP server. I have my own registered domain name, and have it being hosted at a webspace provider (webpage and webforum). I want the local server, however, to place the same domain name in the From: line of all mails from the local, household server.
For the sake of discussion, let's call the registered domain Blah.com. I set up the local server with the name Server, and that is the name I can ping it from the Windows machines as (thanks to Samba).
However, when I post test messags to myself, from shell on the Slackware machine, they show up with email@example.com in the From: line. I want all messages to instead say firstname.lastname@example.org in the headers.
I have tried editting /etc/HOSTNAME and /etc/hosts to eliminate server. from the name, but that causes other problems, including, at startup: httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName as well as, at other points, complaining about not being able to do reverse lookup, or something of the sort, on my domain name, and so couldn't launch httpd (or some other service like that), and then the shell prompt coming up with the domain name different than it should.
I.e., originally it was coming up nomad@server:~$, but after various tinkering with the above, it came up email@example.com and even nomad@blah
But at least at one point my From: line came up the way I wanted it...
I then restored /etc/HOSTNAME back to the longer server.blah.com and the problems went away, but I'm back to the domain name appearing "wrong" in my mail headers.
Is there a simple, system-friendly way to have sendmail always have mailheaders say From: firstname.lastname@example.org in the headers? Without me having to fly through hoops to do it?