LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to change user@localhost.localdomain to user@host? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-change-user%40localhost-localdomain-to-user%40host-504549/)

Kropotkin 11-24-2006 01:57 PM

how to change user@localhost.localdomain to user@host?
 
Hi all,

How do I configure my Fedora 6 system so that when I use the "mail" program in terminal and in scripts the From address is user@host instead of user@localhost.localdomain?

The correct host name of my system is set in:
/etc/sysconfig/network
/etc/hosts
and it is displayed accordingly at, for example, the bash prompt. But there must be some other location that is needed as well. Can anyone help?

TIA

Lenard 11-25-2006 12:04 PM

Read man hostname for the details;

as root type hostname MyComputerName

[lenard@DESKTOP2400 ~]$ ls
Backgrounds Desktop google-earth IFU Matrox.txt
bin Downloads Hardware.txt iptables Personal

Kropotkin 11-25-2006 04:13 PM

Thanks, but hostname doesn't seem to affect the mail program. It must be some setting buried deep in sendmail.

Oddly enough, this is setup correctly by default under Ubuntu; no localhost.localdomain stuff From:, just user@host.

Kropotkin 11-25-2006 04:29 PM

Ha, I found the solution; it is in this thread: http://www.linuxquestions.org/questi...d.php?t=230040

It involves setting the hostname in this file /etc/mail/local-host-names and restarting sendmail.


All times are GMT -5. The time now is 08:57 PM.