Objective :
After I installed Zimbra mail server for test, it had domain test.domain.com. Today I want to change current domain and migrate all data from test.domain.com to test.com. Furthermore I want to set email alias from old account to new account too.
Server and Domain Detail:
Server host name (check by command #uname -n) : mail.test.domain.com
Old domain name : test.domain.com (user has email xxx@test.domain.com)
New domain name : domain.com (user has email xxx@domain.com)
Zimbra server version : 5.0.2 (Upgrade from 4.0.9)
Summary steps :
1. Update DNS for support new domain name.
2. Rename domain name.
3. Create old domain by virtual domain.
4. Set alias email from old domain to new domain.
5. Set A record & MX record from your Hosting.
Estimate time : 90 Minutes.
All steps :
1. Smile
2. Stop Zimbra service
3. Backup Zimbra.
4. Start Zimbra Service again.# cd /opt
# tar cvfz zimbra20080321.tgz zimbra
5. Check Zimbra service
5.1 If you found this message :# su - zimbra
# zmcontrol status
You must delete this file /opt/zimbra/log/zmmailboxd.pid by this command :Host mail.test.domain.com
antispam Running
imapproxy Running
ldap Running
logger Running
mailbox Stopped
zmmailboxdctl is not runningmta Running
snmp Running
spell Running
stats Running
6. Check Zimbra service again.# zmcontrol stop
# rm -rf /opt/zimbra/log/zmmailboxd.pid
# zmcontrol start
6.1 If you found this message :# su - zimbra
# zmcontrol status
You must run this command (Type 1 line):Host mail.test.domain.com
antispam Running
antivirus Running
imapproxy Stopped
nginx is not runningldap Running
memcached is running
logger Running
mailbox Running
mta Running
snmp Running
spell Running
stats Running
7. Change DNS and MX Record# su - zimbra
# zmprov ms mail.test.domain.com zimbraImapSSLBindPort 7993 zimbraImapBindPort 7143 zimbraPop3BindPort 7110 zimbraPop3SSLBindPort 7995
# zmcontrol stop
# zmcontrol start
# zmcontrol status
* Change Zone from test.domain.com to domain.com in file /etc/named.conf from
tozone "test.domain.com" IN {
// for common resolving};
type master;
file "test.domain.com.fwd";
allow-update { none; };
* Copy file from /var/named/test.domain.com to /var/named/domain.com.fwdzone "domain.com" IN {
// for common resolving};
type master;
file "domain.com.fwd";
allow-update { none; };
* Edit detail in file /var/named/domain.com.fwd
to$TTL 86400
@ IN SOA mail.test.domain.com. root.domain.com.(
mail IN A 192.168.201.32008020500 ; SerialIN NS mail.test.domain.com.
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN MX 10 test.domain.com.
IN A 192.168.201.3
8. Reload named config$TTL 86400
@ IN SOA mail.test.domain.com. root.domain.com.(
mail IN A 192.168.201.32008031900 ; SerialIN NS mail.test.domain.com.
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN MX 10 mail.domain.com.
IN A 192.168.201.3
mail.test IN A 192.168.201.3
9. Change domain name from test.domain.com to domain.com# service named reload
** -l = LDAP# su - zimbra
# zmprov -l rd test.domain.com domain.com
** rd = Rename Domain
10. Initial Document feature.
11. Restart&check status of zimbra service.# su - zimbra
# zmprov in wiki@domain.com
# zmprov impn wiki@domain.com /opt/zimbra/wiki/Template Template
12. Create virtual host for domain.com (Admin page)# su - zimbra
# zmcontrol stop
# zmcontrol start
# zmcontrol status
10. Test send&receive email.12.1 Click Domain -> domain.com -> Virtual Hosts
12.2 Create virtual host : mail.domain.com
11. Test create/edit/delete document.
12. Create test.domain.com domain by Zimbra Administrator page. (After rename completed, someone may be sent email to xxx@test.domain.com so I will create test.domain.com and set alias email from test.domain.com to domain.com for all user)
13. Create all user on test.domain.com like domain.com and set forward email from test.domain.com to domain.com. You can create&set forward email by this script :12.1 Click Domain -> New
Domain : test.domain.com12.2 Next
Default class of service : default
Domain status : active
12.3 GAL Mode : Internal
12.4 Authentication mechanism : Internal
12.5 Virtual host : test.domain.com
12.6 Select : Create domain level document space
12.7 Finish
14. Test send email from domain test.domain.com and check new email in domain domain.com.#!/bin/bash
################################################## ###############################
# File name : ForwardEmailAll.sh #
# Objective : Create alias email fro all user from old domain to new domain. #
# Create : March 20, 2008 #
################################################## ###############################
FromDN=$1;
ToDN=$2;
NUM_ARGU=$#;
HELP(){
echo "Help";}
echo "$0 [From doman] [To Domain]";
echo "Example :";
echo " $0 test.domain.com domain.com";
exit;
if [ ${NUM_ARGU} -ne 2 ]
then
HELP;else
for ID in `zmprov gaa ${ToDN} | awk -F'@' '{print $1}'`fi
do
echo "zmprov ca ${ID}@${FromDN} admin1";done
zmprov ca ${ID}@${FromDN} admin1
sleep 1;
echo "zmprov ma ${ID}@${FromDN} zimbraprefMailForwardingAddress ${ID}@${ToDN}";
zmprov ma ${ID}@${FromDN} zimbraprefMailForwardingAddress ${ID}@${ToDN}
15. If you have good solution , please let me know.![]()


LinkBack URL
About LinkBacks

icked domain.rs






