PDA

View Full Version : Question on changing hostname


satimis
12th November 2007, 13:13
Hi folks,


Ubuntu 7.04 server amd64


I need to change hostname from;
ubuntu.satimis.com

to:
mail.satimis.com



Apart making changes on;

1)
$ sudo postconf -e myhostname=mail.satimis.com
$ cat /etc/postfix/main.cf | grep myhostname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
myhostname = mail.satimis.com


$ sudo /etc/init.d/postfix restart
* Stopping Postfix Mail Transport Agent postfix [ OK ]
* Starting Postfix Mail Transport Agent postfix [ OK ]



2)
Edit /etc/hosts as;
127.0.0.1 localhost.localdomain localhost
192.168.0.10 mail.satimis.com mail

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


Edit /etc/hostname as;
mail.satimis.com



$ sudo newaliases
$ sudo hostname mail.satimis.com
Both w/o complaint


$ uname -n
mail.satimis.com
$ hostname -a
mail
$ hostname -s
mail
$ hostname -d
satimis.com
$ hostname -f
mail.satimis.com
$ hostname
mail.satimis.com
$ hostname -i
192.168.0.10
$ hostname -y
(none)


I don't have /etc/sysconfig/network file and "sysconfig" directory


Please advise any other files I need to edit as well. TIA


Edit:

Found following errors:-


1)
$ cat /etc/resolve.conf;
nameserver 202.14.67.4
nameserver 202.14.67.14
satimis@#ubuntu

202.14.67.4
202.14.67.14

are DNS of ISP.

I think there is a mistake here. Whether delete "satimis@#ubuntu" and replace it with "mail.satimis.com"?


2)
At booting on text scrolling;
Warning:unable to determin IP address of
'ubuntu_mail.satimis.com' error: no value servers
configured - Fatal error processing configuration file
'/etc/proftpd/proftpd.con [fail]



3)
Login as satimis. On console, it prompt;
satimis@#ubuntu
mail:~$

2 lines

Not
satimis@satimis.com
mail:~$



4)
$ dig MX mail.satimis.com

; <<>> DiG 9.3.4 <<>> MX mail.satimis.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57982
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;mail.satimis.com. IN MX

;; ANSWER SECTION:
mail.satimis.com. 3589 IN CNAME mail.satimis.com.

;; Query time: 20 msec
;; SERVER: 202.14.67.4#53(202.14.67.4)
;; WHEN: Tue Nov 13 00:31:11 2007
;; MSG SIZE rcvd: 48
[/code]


Please advise how to fix the problem. TIA


B.R.
satimis

falko
13th November 2007, 17:20
Please run
echo "mail.satimis.com" > /etc/hostname
/etc/init.d/hostname.sh start
postconf -e 'myorigin = mail.satimis.com '
/etc/init.d/postfix restart