Follow this and you should be good
1. Stop the flow of mail/Zimbra and take backup.
2. The new hostname must exist in the DNS before zmsetservername is run. If it does not already exist in the DNS, we need to add the new hostname to the DNS now.
Note: If the box is duplicate of production server, prevent this server from affecting the production server by halting communications between test and live servers.
3. execute the following commands:
su - zimbra
/opt/zimbra/libexec/zmsetservername -o old.server.com -n new.server.com (replace old and new hostnames as per your requirement).
4. Reconfigured the system for its new hostname as necessary for the operating system, (very important to do this AFTER step 3 - edited /etc/hosts & /etc/sysconfig/network files and update the new hostname in Red Hat).
Always ready to help.