We have a domain to which our Zimbra (let's call it zimbra1) was the MTA. Since we migrated all the accounts of this domain to another Zimbra (zimbra2) server, we set the domain as "closed" on zimbra1 to bounce the emails coming there. Then, once the migration was complete, we change the MX record in DNS to the zimbra2. So now, all emails directly go to zimbra2

The problem is that the emails that are sent using our zimbra1 smtp server to this domain are still bounced instead of checking the MX record in DNS, because zimbra1 still thinks it manages this domain. And we cannot remove the closed domain since we want to keep track of it and keep the backups on zimbra1.

So what would be the best way for zimbra1 to send the emails to the new MX, instead of trying to deliver on locally closed domain ?

I tried first to use this, but emails were still bounced instead of being delivered to "other-mta.domain.com"

md example.com zimbraMailCatchAllAddress @example.com
md example.com zimbraMailCatchAllForwardingAddress @example.com 
md example.com zimbraMailTransport smtp:other-mta.domain.com
Then i tried to rename the domain, and it seems to work. And hopefully the accounts still have the same ids so that the path on disk remains the same (for backup purposes)

zmprov --ldap  renameDomain example.com closed-example.com
domain example.com renamed to closed-example.com
But i still wonder if i made the good choice, or if there was a better and proper way to do this. Is there ?