Error! Attribute zimbraGalAccountId of domain SomeDomain.com references an invalid account ID: (some long hex number)
If you get this message there is a good chance the GalSync account for the domain has been deleted. To correct this issue, you need to ssh to the zimbra server (or if you are running zimbra on multiple servers – ssh to the zimbra ldap server) and execute the following:
su zimbra source ~/bin/zmshutil zmsetvars ldapsearch -x -H $ldap_master_url -D $zimbra_ldap_userdn -w $zimbra_ldap_password "(zimbraDomainName=SomeDomain.com)"
(where SomeDomain.com is the domain we are working with)
You will get something like the following:
# extended LDIF # # LDAPv3 # base <> (default) with scope subtree # filter: (zimbraDomainName=SomeDomain.com) # requesting: ALL # # SomeDomain.com dn: dc=SomeDomain,dc=com o: SomeDomain.com domain zimbraDomainName: SomeDomain.com zimbraDomainStatus: active zimbraMailStatus: enabled zimbraId: 633364c7-2336-424c-864c-66fb014c5097 zimbraCreateTimestamp: 20140225145853Z zimbraAuthMech: zimbra zimbraGalMode: zimbra objectClass: dcObject objectClass: organization objectClass: zimbraDomain objectClass: amavisAccount zimbraDomainType: local dc: SomeDomain zimbraAggregateQuotaLastUsage: 430162240 zimbraGalAccountId: e484a646-0ba4-4980-b252-04296df30881 # search result search: 2 result: 0 Success # numResponses: 2 # numEntries: 1
Note the value after zimbraGalAccountId and put it into the next command (see note below if you have multiple zimbraGalAccountId entries)
zmprov ga e484a646-0ba4-4980-b252-04296df30881
(replace e484a646-0ba4-4980-b252-04296df30881 with the value you got for zimbraGalAccountId above)
I would expect you will get
ERROR: account.NO_SUCH_ACCOUNT (no such account: e484a646-0ba4-4980-b252-04296df30881)
This means the galsync account was deleted. NOTE!!! – If you DONT get a NO_SUCH_ACCOUNT message, you have some other problem! Stop here and go figure out what is going on!
Now we need to clean things up. This will delete the current zimbraGalAccountId that is stored in SomeDomain.com
zmprov md SomeDomain.com zimbraGalAccountid ""
Create a new galsync account
zmgsautil createAccount -a galsync@SomeDomain.com --domain SomeDomain.com -n zimbra -t zimbra -s mail.SomeDomain.com
(replace mail.SomeDomain.com with the correct server name)
The Correct Way To Remove A galsync Account
If you need to remove a galsync account for some reason – you need to use the following command
zmgsautil deleteAccount -a galsync@SomeDomain.com
Note – If there are multiple galsync accounts set up for the domain
Note 1 – if you get 2 or more zimbraGalAccountId entries, that means someone at some time deleted the galsync account incorrectly, then created a new galsync account. To clean this up, for each zimbraGalAccountId use the command:
zmgsautil deleteAccount -i OneOfThezimbraGlaAccountIdValues
for each zimbraGalAccountId values (one may fail if it is already deleted). Then restart these instructions from the beginning to finish cleaning up this issue.