Removing A Mailstore: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Archive}}{{WIP}}=Steps To Remove A Mailstore= | {{BC|Community Sandbox}} | ||
__FORCETOC__ | |||
<div class="col-md-12 ibox-content"> | |||
=Removing a Mailstore= | |||
{{KB|{{Unsupported}}|{{ZCS 8.0}}|{{ZCS 7.0}}|}} | |||
{{Archive}}{{WIP}} | |||
=Steps To Remove A Mailstore= | |||
==Initial Checks== | ==Initial Checks== | ||
Line 128: | Line 133: | ||
[[Category:ZCS 6.0]] | [[Category:ZCS 6.0]] | ||
[[Category:ZCS 5.0]] | [[Category:ZCS 5.0]] | ||
Latest revision as of 20:48, 12 July 2015
Removing a Mailstore
Steps To Remove A Mailstore
Initial Checks
These are extended checks and steps one should follow when removing a mailstore from your environment. Sometimes mailstores will also be running other services and therefor you'll see some steps that would also handle that situation - i.e. mta or ldap replica service is also on the mailstore.
Confirm Users Are Off Mailstore
Confirm there are no users still on the mailstore in question:
# su - zimbra $ source ~/bin/zmshutil $ zmsetvars $ ldapsearch -LLL -x -D $zimbra_ldap_userdn -w $zimbra_ldap_password -H $ldap_url -b "" | grep -i [hostname of host being removed] $ zmprov -l gaa -s [hostname of host being removed]
Zmmailboxmove is one way to move users to other mailstores.
Confirm There Are No Other Dependencies On This Mailstore For Your Environment
Check what system accounts or services may be using that mailstore (also applies to MTA and LDAP):
Run this on all your mailstores:
$ zmlocalconfig | grep -i [hostname of host being removed]
Checking that host-specific values no longer point to the boxes being removed - these would include:
- zimbraSmtpHostname (applies to global, server, domain)
- zimbraLogHostname (global only)
- ldap_url (set in zmlocalconfig *per server*)
- zimbraMtaAuthURL (global and per server)
- zimbraMtaAuthHost (global and per server)
- zimbraSpellCheckURL (global and per server)
- zimbraNotebookAccount (global)
- zimbraSpamIsNotSpamAccount (global)
- zimbraSpamIsSpamAccount (global)
- zimbraConvertdURL (global and per server)
The commands for retrieving this data would include:
$ zmprov gacf [attribute] # global configs $ zmprov gs [server-name] [attribute] # per server $ zmprov gd [domain.com] [attribute] # per domain $ zmlocalconfig [attribute] # per server
And to update these for the new host/s you might of installed to replace the mailstore in question:
$ zmprov mcf [attribute] # global configs $ zmprov ms [server-name] [attribute] [value] # per server $ zmprov md [domain.com] [attribute] [value] # per domain $ zmlocalconfig -e [attribute]="[value]" # per server
On the host being removed from the environment, check the enabled services:
$ zmprov gs `zmhostname` zimbraServiceEnabled
Remove those services no longer desired on each box:
$ zmprov ms `zmhostname` -zimbraServiceEnabled mailbox $ zmprov ms `zmhostname` -zimbraServiceEnabled mta $ zmprov ms `zmhostname` -zimbraServiceEnabled ldap
And so forth.
Make sure the mailstore is not in the zimbraMailHostPool for any of the COSs. Get the ID for that server:
$ zmprov gs `zmhostname` zimbraId
example out would look like: zimbraMailHostPool: 777ed22f-9267-4b0d-81cb-51b677e3e6ae
Then, get the list of zimbraIDs that are part of any of the COS pools (Note: it is a good idea to store this list in case of a problem in the later steps, so they can be replaced):
$ zmprov gc default zimbraMailHostPool (repeat for other COSs)
Then, remove the zimbraIDs from those COS pools:
$ zmprov mc default -zimbraMailHostPool [zimbraID]
Check the zimbraIDs again, make sure it looks as expected:
$ zmprov gc default zimbraMailHostPool (repeat for other COSs)
Delete The Server From The Global Config
Delete the server from the configs:
$ zmprov deleteServer oldserver.domain.com
Update the ssh keys:
$ zmupdateauthkeys
Remove Zimbra
You could rerun the zimbra installer using the -u flag for uninstall:
./install.sh -u
Or manually remove zimbra by
- Manually removing the zimbra packages from your system
- Removing the /opt/zimbra
- Remove any 'zimbra' related files from /tmp