HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Technical (
-   -   Issue after hostname change (

arspoetica 3rd February 2012 05:37

Issue after hostname change
So I already know that I should just leave it alone, but I wanted to change the prefix to my server >

Well I changed it in /etc/hosts and /etc/hostname, and after changing it and restarting everything seems to be working fine... except when I check with "netstat -alnp |grep -w LISTEN" it shows all's where my external static IP used to be (next to the open port). When I added a new listening port my IP pops back up on the new one, but still not on the old ones, which makes me think I missed a hostname somewhere or something to that effect.

I followed the Perfect Server with ISPconfig 3 and courier guide so I have Bind9 and ISPconfig 3 and so on... oh, and there were a few errors with IPtables so I flushed that with iptables -F (this was after the problem occurred)

Any ideas on what the issue is? I have tried searching for an answer, for an hour or two, but I don't really know what I am looking for or how to say it...

falko 3rd February 2012 13:49

Did you change the hostname also in your service configuratios (like Postfix, Apache, etc.)?

arspoetica 3rd February 2012 20:27

I changed it in ispconfig (although I read that that is more for the internal processes or something) but I couldn't find it in apache or postfix or any files for bind besides the zone file used by ispconfig... and any others than that and I don't know where to check. All that I have read all they ever say is to change it in the hostname and hosts files.

I'm sure it is probably something stupid I am overlooking whether it be a mysql file, apache file or something that is staring me in the face

I guess it could also be that I go to a file that is missing the server entry and I'm not familiar enough with the file to know that it should be there.

falko 4th February 2012 12:19

Let's start with Postfix. What's in /etc/postfix/ and /etc/mailname?

arspoetica 4th February 2012 19:06

in mailname it's just my domain without the prefix

/etc/postfix/ seems to link to a lot of mysql stuff but here it is


# See /usr/share/postfix/ for a commented, more complete version

# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
myorigin = $mydomain
mydestination =, localhost, localhost.localdomain
mynetworks = [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
html_directory = /usr/share/doc/postfix/html
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/, proxy:mysql:/etc/postfix/, hash:/var/lib/mailman/data/virtual-mailman
virtual_mailbox_domains = proxy:mysql:/etc/postfix/
virtual_mailbox_maps = proxy:mysql:/etc/postfix/
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/, reject_unauth_destination
smtpd_tls_security_level = may
transport_maps = proxy:mysql:/etc/postfix/
relay_domains = mysql:/etc/postfix/
relay_recipient_maps = mysql:/etc/postfix/
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/
smtpd_client_message_rate_limit = 100
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = maildrop
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks

falko 5th February 2012 14:02

Can you run

postconf -e 'myorigin ='
postconf -e 'myhostname ='

? Replace with your new hostname and restart Postfix.

arspoetica 5th February 2012 20:07

Nope, nothing changed, but here is the results from netstat (minus the ports obviously, and pid to make it fit)
But as you can see named is listed correctly from me re-enabling dns listening to any for bind.

tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____mysqld
tcp........0____0_192.168.5.1____0.0.0.0:*____LIST EN____smbd
tcp........0____0_127.0.0.1______0.0.0.0:*____LIST EN____smbd
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____apache2
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____rpc.mountd
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____couriertcpd
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____couriertcpd
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____portmap
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____apache2
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____apache2
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____rpc.statd
tcp........0____0_63.225.43.65___0.0.0.0:*____LIST EN____named
tcp........0____0_127.0.0.1______0.0.0.0:*____LIST EN____dnsmasq
tcp........0____0_192.168.5.1____0.0.0.0:*____LIST EN____dnsmasq
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____pure-ftpd (SER
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____apache2
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____master
tcp........0____0_127.0.0.1______0.0.0.0:*____LIST EN____named
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____apache2
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____-
tcp........0____0_192.168.5.1____0.0.0.0:*____LIST EN____smbd
tcp........0____0_127.0.0.1______0.0.0.0:*____LIST EN____smbd
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____sshd
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____perl
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____couriertcpd
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____-
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____couriertcpd
tcp........0____0_0.0.0.0________0.0.0.0:*____LIST EN____xinetd
tcp........0____0_127.0.0.1______0.0.0.0:*____LIST EN____amavisd
tcp........0____0_127.0.0.1______0.0.0.0:*____LIST EN____master

All times are GMT +2. The time now is 03:22.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.