Hi all,
I am migrating a domain.no to our zimbra server. In order for us to be able to send mail to domain.no during the migration, I had planned to migrate to domain-mig.no and then rename domain-mig.no to domain.no

Renaming domains does not seem to work properly.
Renaming works when the domain is empty:

prov> gaa domain.md
prov> rd domain.md domain-foo.md
domain domain.md renamed to domain-foo.md
But a domain with 100 users (and no mail) fails.
prov> rd domain-mig.no domain.no
Exception in thread "main" java.util.MissingFormatArgumentException: Format specifier 's'
	at java.util.Formatter.format(Formatter.java:2429)
	at java.util.Formatter.format(Formatter.java:2364)
	at java.lang.String.format(String.java:2558)
	at com.zimbra.cs.account.ldap.RenameDomain.warn(RenameDomain.java:807)
	at com.zimbra.cs.account.ldap.RenameDomain.warn(RenameDomain.java:802)
	at com.zimbra.cs.account.ldap.RenameDomain.access$400(RenameDomain.java:53)
	at com.zimbra.cs.account.ldap.RenameDomain$RenameDomainVisitor.fixupForeignTarget(RenameDomain.java:747)
	at com.zimbra.cs.account.ldap.RenameDomain$RenameDomainVisitor.handleForeignAlias(RenameDomain.java:713)
	at com.zimbra.cs.account.ldap.RenameDomain$RenameDomainVisitor.visit(RenameDomain.java:451)
	at com.zimbra.cs.account.ldap.LdapProvisioning.searchObjects(LdapProvisioning.java:1115)
	at com.zimbra.cs.account.ldap.LdapProvisioning.searchObjects(LdapProvisioning.java:1055)
	at com.zimbra.cs.account.ldap.RenameDomain.execute(RenameDomain.java:116)
	at com.zimbra.cs.account.ldap.LdapProvisioning.renameDomain(LdapProvisioning.java:2177)
	at com.zimbra.cs.account.ProvUtil.doRenameDomain(ProvUtil.java:873)
	at com.zimbra.cs.account.ProvUtil.execute(ProvUtil.java:676)
	at com.zimbra.cs.account.ProvUtil.interactive(ProvUtil.java:2028)
	at com.zimbra.cs.account.ProvUtil.main(ProvUtil.java:2157)
Restarting the rename will fail too:

prov> rd domain-mig.no domain.no 
[] WARN: domain domain-mig.no is shutdown
ERROR: service.FAILURE (system failure: unknown phase: ,FIX_FOREIGN_ALIASES) (cause: java.lang.IllegalArgumentException No enum const class com.zimbra.cs.account.ldap.RenameDomain$RenamePhase.,FIX_FOREIGN_ALIASES)
Now you have two domains domain.no and domain-mig.no in a shutdown, locked state. There doesn't seem to be any way to get out of this mess except for deleting the two domains and starting from scratch.

I am aware of other domain rename issues ( Rename Issues ), but this one does not seem to be documented anywhere.

Have you had similar experiences with domain renaming?
Is there a way to unlock the domains after a failed rename? Why is the rename failing? What are my alternatives?
# zmcontrol -v

Release 5.0.16_GA_2921.RHEL5_64_20090429021719 RHEL5_64 NETWORK edition
Kacper Wysocki
Infrastructure Consultant