Changing hostname without breaking Postfix

2 posts / 0 new
Last post
#1 Mon, 05/31/2010 - 01:28
nickorr

Changing hostname without breaking Postfix

I've got a virtualmin instance which used to be called "test.domain". I've now setup a new one to replace that instance, and the original one is going to be changed to "clients.domain". The domains already on it are going to stay where they are.

When I change the hostname under the webmin Network Configuration, any other domains under that first setup no longer work. There is a mail loop, I get an error which includes :

mail for clients.domain loops back to myself.

Is there something else I need to do with postfix to accept that the test.domain has moved elsewhere and new.domain is now itself?

Thanks, Nick

Mon, 05/31/2010 - 09:13
andreychek

Hi Nick,

Yeah, if you change the hostname, you'll want to tweak the Postfix config as well. Open up /etc/postfix/main.cf, and on the mydestination line, change your old hostname to your new one.

Also, just to be sure, make sure that in /etc/hosts, it references your new hostname and not your old one.

-Eric

Topic locked