Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Migration

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-11-2008, 08:26 AM
Junior Member
 
Posts: 9
Exclamation unable to change zimbraMailHost after server move/upgrade

This weekend we moved our Zimbra server to a new server with a new name, and upgraded from 4.5.10 to 5.0.2.

The old server name was zimbra.domain.com, we moved it to a new server in a new internal namespace zimbra.domain.org.

We're keeping the email addresses intact and made no other changes except for the server name, and in doing so following the best practices outlined in the wiki and in some forum posts here. Additionally we ran through two dry runs in this with a copy of the production server in the lab just to be safe.

All accounts moved properly and had no issues accessing their mail with the exception of one account. Upon inspection with zmprova ga, it was determined that for some reason it zimbraMailHost and zimbraMailTransport were still pointing to the old server name. We checked all other accounts and found this was the only account set this way.

Bad Account:
Code:
$ zmprov -l -v ga bad.account@zimbra.domain.com zimbraMailHost   
# name bad.account@zimbra.domain.com
zimbraMailHost: zimbra.domain.com

$ zmprov -l -v ga bad.account@zimbra.domain.com zimbraMailTransport
# name bad.account@zimbra.domain.com
zimbraMailTransport: lmtp:zimbra.domain.com:7025
Working Account:
Code:
$ zmprov -l -v ga good.account@zimbra.domain.com zimbraMailHost 
# name good.account@zimbra.domain.com
zimbraMailHost: zimbra.domain.org

$ zmprov -l -v ga good.account@zimbra.domain.com zimbraMailTransport
# name good.account@zimbra.domain.com
zimbraMailTransport: lmtp:zimbra.domain.org:7025
Attempted:
I attempted to change both the zimbraMailTransport and the zimbraMailHost settings to match a known good account without success:

Code:
$ zmprov -l -v ma bad.account@zimbra.domain.com zimbraMailTransport lmtp:zimbra.domain.org:7025
Was successful, however the following failed:

Code:
$ zmprov -l -v ma bad.account@zimbra.domain.com zimbraMailHost zimbra.domain.org     
ERROR: service.INVALID_REQUEST (invalid request: current value of zimbraMailHost does not match zimbraMailTransport)
com.zimbra.common.service.ServiceException: invalid request: current value of zimbraMailHost does not match zimbraMailTransport
Code:service.INVALID_REQUEST
        at com.zimbra.common.service.ServiceException.INVALID_REQUEST(ServiceException.java:190)
        at com.zimbra.cs.account.callback.MailHost.preModify(MailHost.java:93)
        at com.zimbra.cs.account.AttributeManager.preModify(AttributeManager.java:577)
        at com.zimbra.cs.account.ldap.LdapProvisioning.modifyAttrs(LdapProvisioning.java:267)
        at com.zimbra.cs.account.ldap.LdapProvisioning.modifyAttrs(LdapProvisioning.java:249)
        at com.zimbra.cs.account.ProvUtil.execute(ProvUtil.java:473)
        at com.zimbra.cs.account.ProvUtil.main(ProvUtil.java:1724)
I tried various combinations of setting both zimbraMailTransport and zimbraMailHost with out success.

This is, of course, the president of the company having the problem. No other users have any issues accessing their mailboxes.

Additionally, I am unable to modify this account in the admin gui:

Code:
Command sent to the wrong host.
Details:
soap:Sender
Which makes sense since it's trying to send to zimbra.domain.com which no longer exists. I tried re-pointing the DNS and even created a HOSTS file so that it could reach the new server (zimbra.domain.org), however this did not appear to help.

This is a high priority since it's toally unusable for a VIP. I should be able to change that setting however zmprov is preventing me from doing so, complaining that zimbraMailTransport doesn't match. I even tried to set zimbraMailTransport as zimbra.domain.org, just to see if having it the same name would help, it did not.

I also opened a ticket with Zimbra support, but was hoping someone here had a clue of how I could change zimbraMailHost.

Thanks,
illc0mm

Last edited by illc0mm; 02-11-2008 at 09:45 AM..
Reply With Quote
  #2 (permalink)  
Old 02-11-2008, 07:47 PM
Junior Member
 
Posts: 9
Lightbulb Solved?

Well, I'm letting it sit for a day before I officially call it solved, but it looks like there's a bug in zmprov that I'll try to document later. However, the work around is as follows (thanks to Tony with Zimbra Support for the procedure)

This involves modifying your LDAP store by hand, not recommended unless you're out of options.

First, you need to find your ldap root password:

Quote:
$ zmlocalconfig -s | grep -i ldap_root_password
ldap_root_password = secret
Next, make sure you can query the account with the incorrect zimbraMailHost setting:
Quote:
$ ldapsearch -x -h `zmhostname` -D uid=zimbra,cn=admins,cn=zimbra -w secret "(mail=user.email@zimbra.domain.com)" dn zimbraMailHost

# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: (mail=user.email@zimbra.domain.com)
# requesting: dn zimbraMailHost
#

# user.email, people, zimbra.domain.com
dn: uid=user.email,ou=people,dc=zimbra,dc=domain,dc=co m
zimbraMailHost: zimbra.domain.com

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1
Next, modify the account:

Quote:
$ ldapmodify -x -h `zmhostname` -D uid=zimbra,cn=admins,cn=zimbra -w secret

dn: uid=user.email,ou=people,dc=zimbra,dc=domain,dc=co m

changetype: modify

replace: zimbraMailHost

zimbraMailHost: zimbra.domain.org



modifying entry "uid=user.email,ou=people,dc=zimbra,dc=domain,dc=c om"


dn: uid=user.email,ou=people,dc=zimbra,dc=domain,dc=co m

changetype: modify

replace: zimbraMailTransport

zimbraMailTransport: lmtp:zimbra.domain.org:7025



modifying entry "uid=user.email,ou=people,dc=zimbra,dc=domain,dc=c om"

CTRL-C
Finally restart the Zimbra mailbox

Quote:
$ zmmailboxdctl restart
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.