PDA

View Full Version : problems with chaning hostnames



spz1st
22nd January 2005, 03:35 AM
I posted this at the networking forum a couple of days ago but didn't get any response. So I try again here and hope someone can give me some clues.

I installed Fedora (core 2) on a computer with one specific name and IP on my local network (e.g. foo.mydomain, 192.168.1.6). When everything is working, I changed the name and IP to a different one (e.g. bar.mydomain, 192.168.1.2) by manually editing several configuration files, such as /etc/hosts. /etc/sysconfig/network-scripts/ifcfg-eth0, etc. and rebooting. (The reason I used foo first is that bar is a production machine (but to be replaced by the new machine) and I didn't want to take it down before I had the new machine set up and tested).

But for some reasons, when I send out email, my email address always have the old hostname, such as spz1st@foo.mydomain. And I can not send email to myself, either from this new computer itself or from another computer. The log file shows that the messages are being relayed by foo.mydomain (which of course doesn't exist anymore). I searched all the files under /etc and didn't fine any file that contains foo in it.

Could someone tell me how to resolve this problem without reinstalling the machine from the system CDs?

Thanks.

bob
22nd January 2005, 05:18 AM
Not sure I'm following you. Wouldn't it be just a matter of going into your email program > tools > settings and editing the default account information there?

Dog-One
22nd January 2005, 08:05 AM
In the /etc/sysconfig/network file, there should be an entry HOSTNAME=. Change that to your new hostname and reboot. This is typically a FQDM name BTW.

spz1st
23rd January 2005, 06:41 PM
I just use the mail program from the commandline. I guess it probably has something to do with sendmail. Thanks.

spz1st
23rd January 2005, 06:45 PM
The HOSTNAME in /etc/sysconfig/network has the proper value, i.e. it has the value of bar.mydomain. As I said in the first post that no files under /etc contain foo in them. I'm wondering where the system got foo from.

Thanks.