Steps to change the Zimbra server’s hostname using zmsetservername
Steps to change the Zimbra server’s hostname using zmsetservername
Use the following steps to change the Zimbra server’s hostname using the zmsetservername command line utility.
1. Stop the flow of mail/Zimbra and back up your entire /opt/zimbra and any linked folders. For more information on creating a backup, seeCategory:Backup and Restore.
2. The new hostname must exist in the DNS before zmsetservername is run. If it does not already exist in the DNS, add the new hostname to the DNS now.
Note: If the box is duplicate of production server, prevent this command from affecting the production server by halting communications between test and live servers.
3. Run the following commands:
su - zimbra /opt/zimbra/libexec/zmsetservername -n <servername>
4. Reconfigure the system for its new hostname as necessary for the operating system, (very important to do this AFTER step 3).
5. Reboot.
Note: If you have a multi-server setup, be sure to change any corresponding references to the old hostname & restart services on all hosts.
6. Use zmlocalconfig and zmprov to manually double-check the global config, server configs, user settings, etc.
zmprov gacf | grep oldhostname zmprov gs `zmhostname` | grep oldhostname zmlocalconfig | grep oldhostname
7. Remove the old sever entry from the DNS.
Errors are usually certificates. If you are experiencing errors, you will probably need to obtain new certs to match the new hostname. For more information on working with certificates, see Administration Console and CLI Certificate Tools. For more information on troubleshooting certificate issues, see Category:Troubleshooting Certificates.
After running ZmSetServerName if you see in Server Status both old and new names.
I find the correct command to modify the mapping where I missed it:
“zmloggerhostmap -d” to delete a mapping and “-a” to add one. the problem was I use “zmloggerhostmap –help” for the manual but it only accept “-h” and my system was configured in Spanish that I didn’t quite understand to find the expected parameter to modify it. So I was simply thinking zmloggerhostmap is a loopup tool.
so with the correct command:
zmloggerhostmap -d myhost.mydomain.com myhost zmloggerhostmap -a myhost.mydomain.com myhost.mydomain.com You may also encounter this problem: Server error encountered Message: system failure: exception during auth {RemoteManager: mail.domain.com->zimbra@mail.domain.com:22} Error code: service.FAILURE Method: [unknown] Details:soap:Receiver this is the solution: http://wiki.zimbra.com/index.php?title=Mail_Queue_Monitoring