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 Display Modes
  #1 (permalink)  
Old 03-21-2008, 03:11 AM
Active Member
 
Posts: 30
Thumbs up [SOLVED] How to rename domain name from test.domain.com to domain.com.

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.
Quote:
# cd /opt
# tar cvfz zimbra20080321.tgz zimbra
4. Start Zimbra Service again.

5. Check Zimbra service
Quote:
# su - zimbra
# zmcontrol status
5.1 If you found this message :
Quote:
Host mail.test.domain.com
antispam Running
imapproxy Running
ldap Running
logger Running
mailbox Stopped
zmmailboxdctl is not running
mta Running
snmp Running
spell Running
stats Running
You must delete this file /opt/zimbra/log/zmmailboxd.pid by this command :
Quote:
# zmcontrol stop
# rm -rf /opt/zimbra/log/zmmailboxd.pid
# zmcontrol start
6. Check Zimbra service again.
Quote:
# su - zimbra
# zmcontrol status
6.1 If you found this message :
Quote:
Host mail.test.domain.com
antispam Running
antivirus Running
imapproxy Stopped
nginx is not running
memcached is running
ldap Running
logger Running
mailbox Running
mta Running
snmp Running
spell Running
stats Running
You must run this command (Type 1 line):
Quote:
# su - zimbra
# zmprov ms mail.test.domain.com zimbraImapSSLBindPort 7993 zimbraImapBindPort 7143 zimbraPop3BindPort 7110 zimbraPop3SSLBindPort 7995
# zmcontrol stop
# zmcontrol start
# zmcontrol status
7. Change DNS and MX Record

* Change Zone from test.domain.com to domain.com in file /etc/named.conf from
Quote:
zone "test.domain.com" IN {
// for common resolving
type master;
file "test.domain.com.fwd";
allow-update { none; };
};
to

Quote:
zone "domain.com" IN {
// for common resolving
type master;
file "domain.com.fwd";
allow-update { none; };
};
* Copy file from /var/named/test.domain.com to /var/named/domain.com.fwd
* Edit detail in file /var/named/domain.com.fwd
Quote:
$TTL 86400
@ IN SOA mail.test.domain.com. root.domain.com.(
2008020500 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS mail.test.domain.com.
IN MX 10 test.domain.com.

IN A 192.168.201.3
mail IN A 192.168.201.3
to

Quote:
$TTL 86400
@ IN SOA mail.test.domain.com. root.domain.com.(
2008031900 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS mail.test.domain.com.
IN MX 10 mail.domain.com.

IN A 192.168.201.3
mail IN A 192.168.201.3
mail.test IN A 192.168.201.3
8. Reload named config
Quote:
# service named reload
9. Change domain name from test.domain.com to domain.com
Quote:
# su - zimbra
# zmprov -l rd test.domain.com domain.com
** -l = LDAP
** rd = Rename Domain

10. Initial Document feature.
Quote:
# su - zimbra
# zmprov in wiki@domain.com
# zmprov impn wiki@domain.com /opt/zimbra/wiki/Template Template
11. Restart&check status of zimbra service.
Quote:
# su - zimbra
# zmcontrol stop
# zmcontrol start
# zmcontrol status
12. Create virtual host for domain.com (Admin page)
Quote:
12.1 Click Domain -> domain.com -> Virtual Hosts
12.2 Create virtual host : mail.domain.com
10. Test send&receive email.

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)
Quote:
12.1 Click Domain -> New
Domain : test.domain.com
Default class of service : default
Domain status : active
12.2 Next
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
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 :
Quote:
#!/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}'`
do
echo "zmprov ca ${ID}@${FromDN} admin1";
zmprov ca ${ID}@${FromDN} admin1
sleep 1;
echo "zmprov ma ${ID}@${FromDN} zimbraprefMailForwardingAddress ${ID}@${ToDN}";
zmprov ma ${ID}@${FromDN} zimbraprefMailForwardingAddress ${ID}@${ToDN}
done
fi
14. Test send email from domain test.domain.com and check new email in domain domain.com.

15. If you have good solution , please let me know.
__________________
--------------------------------------------------------------------------
Normal man
Reply With Quote
  #2 (permalink)  
Old 05-23-2008, 06:54 AM
Starter Member
 
Posts: 1
Default

Successfully changeddomain name from domain.co.yu to domain.rs.
Thanks man

Changes:

Chapter 7: I am created two zone files for bind9
Chapter 12: doesn’t create virtual host
Chapter 12.5 doesn’t create virtual host

Additional: in admin>general>default domain icked domain.rs

Cheers
Reply With Quote
  #3 (permalink)  
Old 05-23-2008, 12:13 PM
Zimbra Consultant
 
Posts: 5,814
Default

Welcome to the forums,
BTW there's a new command:
zmprov -l renameDomain test.domain.com domain.com
-Helps a bunch if you don't want to do domain forwarding etc.
(You still have to update DNS/MX/Bind etc - that just takes care of things Zimbra side.)
__________________
-Mike Morse (MCode151)

ZCS-to-ZCS Migrations & Moves | Admin Tools & Tidbits » ZimbraBlog.com | ZimbraCommunity.com
Reply With Quote
  #4 (permalink)  
Old 11-25-2008, 06:03 PM
Senior Member
 
Posts: 50
Default

Guys;
I want to rename my test.domain.com to domain.com. Does the command "zmprov -l renameDomain test.domain.com domain.com" change the whole Zimbra setup including the user email address (from user@test.domain.com to user@domain.com) ?

Thanks.
Matnor
Reply With Quote
  #5 (permalink)  
Old 11-29-2008, 07:11 AM
Senior Member
 
Posts: 50
Default

I can't login after renamed the domain. Zmcontrol Status - all running
Reply With Quote
  #6 (permalink)  
Old 11-29-2008, 07:50 AM
Senior Member
 
Posts: 50
Default

Quote:
Originally Posted by matnor View Post
I can't login after renamed the domain. Zmcontrol Status - all running
OK. Can login now after run zmprov mcf zimbraDefaultDomainName domain.com.
Reply With Quote
  #7 (permalink)  
Old 11-30-2008, 04:44 AM
Senior Member
 
Posts: 50
Default

I've upgraded to 5.0.11 FOSS successfully with new domain.

Thanks to Zimbra.

Matnor
Reply With Quote
  #8 (permalink)  
Old 04-27-2009, 03:49 AM
Junior Member
 
Posts: 5
Default

Would renaming the domain and affect ZCO users, i.e resyncing their mail? A lot of our users are offsite with slower connections and large mailboxes!!

I have tested this with zimbra on a virtual machine, but can't remember what the result was. Can someone confirm?
Reply With Quote
Reply


Thread Tools
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.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0