PDA

View Full Version : CentOS hostname wrong


n2zen
2nd April 2006, 18:08
Have new dedicated server, CentOS 4.x, console-only of course, about 90% done with initial setup (apache/mysql/vsftpd/postfix/webmin etc). However, the Postfix 2.1.5 seems to think the Hostname is: server.domain.com

I'm trying to figure out where/how to configure this to the proper domain. Yes, I've tried setting the myhostname=blah.blah.blah in the /etc/postfix/main.cf, with no change.

netstat -tap shows:
tcp 0 0 server.domain.com:domain *:* LISTEN 11086/named

did manage to update the global hostname in:
/etc/sysconfig/network
and /etc/hosts

However, it appears I still need named resolution...?

netstat -tap shows:

tcp 0 0 blahmydomain.com:domain *:* LISTEN 4439/named
and tcp 0 0 *:smtp *:* LISTEN 3640/master


Concluding that I need to tweak the 'named' configuration... Tried tweaking things haphazardly in that confirg and managed to break too many things - had to rollback the changes, and thought it a good time to ask for a hand :)

Are there any simple steps to correcting/changing the box hostname? Helpful steps/links would be appreciated - thanks!

falko
2nd April 2006, 22:26
netstat -tap shows:
tcp 0 0 server.domain.com:domain *:* LISTEN 11086/named

That's BIND, not Postfix! The Postfix output looks ok.
Why do you want to change the hostname? I don't see a problem with this.

n2zen
3rd April 2006, 00:07
Well, the symptom is that email isn't accepting inbound connections, and i'm sure the apf firewall is allowing traffic on port 110. Was perhaps wrongly assuming there's a problem with either the named config or postfix config relating to hostname assignment/resolution.

Hrmm do notice that netstat -tap doesn't show any pop3 listeners, though there are 2 different lines with:
tcp 0 0 *:smtp *:* LISTEN 3640/master

falko
3rd April 2006, 12:13
Well, the symptom is that email isn't accepting inbound connections, and i'm sure the apf firewall is allowing traffic on port 110.
You must allow traffic on port 25 (SMTP). Port 110 is for POP3.

Hrmm do notice that netstat -tap doesn't show any pop3 listeners, though there are 2 different lines with:
tcp 0 0 *:smtp *:* LISTEN 3640/masterSame as above, smtp is port 25; POP3 is port 110.

n2zen
3rd April 2006, 14:26
Yes, smtp port 25 is open in the firewall, and shows listeners in the netstat. Think my isp is blocking me using other smtp services anyway... At this point the key issue is pop3 not showing in the netstat and the fact that I can't connect to it. Can't even telnet to mail.blahdomain.com port 110 and get a connection. Kinda makes me think there's no pop3 service listener...

falko
3rd April 2006, 20:21
Which POP3 daemon do you have installed? Dovecot? Please try /etc/init.d/dovecot restart