...
Change the postfix configuration files
- edit Change the hostname in /etc/mailnamereplace
- Change the hostname do the same with in /etc/postfix/header_checks.It If the file doesn't exist check the following JIRA issue: BLUE-689
...
- , create it using the procedure at http://wiki.bluelightav.org/x/PAIW
Update /etc/postfix/generic and /etc/postfix/main.cf by (replacing <hostname> and <domain>):
postconf -e myhostname=<hostname>
postconf -e mydestination=<hostname>,localhost.<domain>,localhost
...
postconf -e 'smtp_header_checks = regexp:/etc/postfix/header_checks'
Restart postfix:
/etc/init.d/postfix reload
In case there is undelivered mail from the old hostname, if not required it can be deleted using postsuper -d ALL
Debian
Reference: Debian WIKI page on changing hostname.
...