If you change the hostname, you also have to edit the following files manually!
- "$mydomain" @ /etc/amavisd/amavisd.conf
- "ServerName" @ /usr/local/apache/conf/httpd.conf
they will not be changed automatically!
And maybe also:
if you have a custom root@ email-address set up.
Before rebuilding the mailserver I strongly recommend to backup you postfix and dovecot settings!
or all your custom settings will get lost!
All the best,