Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 21st March 2009, 23:16
roadster roadster is offline
Junior Member
Join Date: Apr 2007
Location: UK
Posts: 18
Thanks: 2
Thanked 2 Times in 2 Posts
Default Postfix: Using wrong host name

After over a year of trouble free operation I ran into a problem today.

I needed to change the server name / host name of the machine and did this in the usual places - /etc/hostname, /etc/hosts, /home/admispconfig/ispconfig/lib/config.inc.php and /root/ispconfig/httpd/conf/httpd.conf

This change was also reflected in ISPConfig|Management|Server|Settings

Now, Postfix still seems to be trying to use the old hostname. I added the new details in /etc/postfix/main.cf (I didn't need them there for the old host name) and reloaded postfix (even did a server restart)

postconf - d correctly lists the new host but postconf -n lists the old

When mail comes in Postfix is trying to map messages to username@oldhostname.mydomain.com instead of username@oldhostname.mydomain.com and the Postfix banner still refers to the old host name.

As Postfix was attempting to resolve the old host name (no longer listed in DNS) it was just delaying and queuing mail. I've had to do a temporary workaround of adding oldhostname.mydomain.com to /etc/local-host-names to keep mail flowing.

I can't figure out where Postfix is pulling the old setting from and why changes made in main.cf aren't being processed.

Any ideas guys?

Many thanks in anticipation .....
Reply With Quote
Sponsored Links
Old 21st March 2009, 23:51
roadster roadster is offline
Junior Member
Join Date: Apr 2007
Location: UK
Posts: 18
Thanks: 2
Thanked 2 Times in 2 Posts
Default Fixed!

As usual, within minutes of seeking help the solution appears. It looks as though there were two entries for myhostname in main.cf - the one I'd uncommented and changed that comes as part of the default file and one for my old hostname richt at the bottom which had been added when doing the Perfect Setup using the old hostname ... being the last to be read it was the one that got used. Duhhhh
Reply With Quote


host, hostname, main.cf, postfix

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Undelivered Mail Returned to Sender Error202 General 5 7th May 2009 12:14
localhost postfix/master: fatal: bind port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 18:39
CentoS doesn't send the emails vaio1 Installation/Configuration 18 5th November 2008 18:51
Mail System Error - Returned Mail tristanlee85 General 16 16th March 2008 10:40
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 16:47

All times are GMT +2. The time now is 08:09.

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