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

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 04-14-2010, 01:59 AM
Senior Member
 
Posts: 63
Default [SOLVED] Virtual Domain and main domain

Hi all !

Recently my company change the domain name.
I have zimbra now, with 1200+ accounts.
I've @domain1.com and added a VirtualDomain @domain2.com with the option zimbraMailCatchAllAddress so that every email sent to the new domain domain2.com will go into the user@domain1.com.

I've done this so i don't have to create all the accounts again. I hope this is correct.

My question is:
The users will sent emails and they will go with the old domain user@domain1.com
I want the emails to go with the new domain user@domain2.com

How can i accomplish this ?

Cheers,

Bruno Santos
Reply With Quote
  #2 (permalink)  
Old 04-14-2010, 02:13 AM
Senior Member
 
Posts: 63
Default

I've been reading the zimbra wiki and a question:
Is what i want anything to do with Domain Masquerading ?

Cheers
Reply With Quote
  #3 (permalink)  
Old 04-14-2010, 04:58 AM
Advanced Member
 
Posts: 236
Thumbs up

Why not move (rename) the accounts to the new domain?.

ZCS has the advantage that user accounts (and other objects) are referenced internally by their zimbraID and not the email address, this allows you to rename accounts including their domain.

I've tried it a few times in the lab and it has worked, though I haven't done intensive real-world tests on it. Try it in your lab or use a dummy account in the main server (carefully) and see how it goes. Afterwards you can use a massive zmprov modifyAccount batch to move them all.

...OR you can also add aliases for each account in the new domain. A simple script that does something like "zmprov addAccountAlias $user@$domain1.tld $user@$domain2.tld" shouldn't be too difficult to create.
Reply With Quote
  #4 (permalink)  
Old 04-14-2010, 05:57 AM
Senior Member
 
Posts: 63
Default

Thx for the reply.

Maybe i'll try that - need to dig a little more.
The script will not be difficult: is there any way to list all the user accounts in Zimbra ?
Reply With Quote
  #5 (permalink)  
Old 04-14-2010, 06:16 AM
Moderator
 
Posts: 6,237
Default

Or you can use renameDomain to do it fast (then re-create domain1 when done):
Code:
zmprov dd domain2.com
zmprov rd domain1.com domain2.com
zmprov cad domain1.com domain2.com zimbraMailCatchAllForwardingAddress @domain2.com
Now everyone sends like their domain2, but can still receive on domain1 just in-case.

Or the below, but not sure what the outcome of Bug 33722 - deprecate canonical address will be yet. Since you already have a domain2 fwding to domain1 (if you've since deleted re-add with zmprov cad domain2.com domain1.com zimbraMailCatchAllForwardingAddress @domain1.com), now make people sending from 1 seem like 2:
Quote:
zmprov md domain1.com zimbraMailCatchAllAddress @domain1.com zimbraMailCatchAllCanonicalAddress @domain2.com
If you for some reason still want to move them one-by-one, references:
Zmprov - Zimbra :: Wiki
Zmprov Examples - Zimbra :: Wiki
[SOLVED] Looking for reporting output of names, accounts, lists, alias, etc.
Appendix A*Command-Line Utilities
Reply With Quote
  #6 (permalink)  
Old 04-14-2010, 06:17 AM
Advanced Member
 
Posts: 236
Default

yes, to list all accounts you run:

zmprov -l getAllAccounts

(or "zmprov -l gaa" for short)

The list will include admin and other system accounts (wiki, spam, ham)...you may want to create new ones for the new domain instead of recycling the "old" ones. Maybe someone else can answer that better.
Reply With Quote
  #7 (permalink)  
Old 04-14-2010, 06:19 AM
Advanced Member
 
Posts: 236
Default

mmorse, that's even better!

I haven't worked much with the domains commands for zmprov, but this will definetly be a LOT faster.
Reply With Quote
  #8 (permalink)  
Old 04-15-2010, 02:34 AM
Senior Member
 
Posts: 63
Default

Thx all for the replys.

I'll try that and i'll post the results.

Cheers,

Bruno Santos
Reply With Quote
  #9 (permalink)  
Old 05-06-2010, 06:13 AM
Senior Member
 
Posts: 63
Default

Quote:
Originally Posted by mmorse View Post
Or you can use renameDomain to do it fast (then re-create domain1 when done):
Code:
zmprov dd domain2.com
zmprov rd domain1.com domain2.com
zmprov cad domain1.com domain2.com zimbraMailCatchAllForwardingAddress @domain2.com
Now everyone sends like their domain2, but can still receive on domain1 just in-case.

Or the below, but not sure what the outcome of Bug 33722 - deprecate canonical address will be yet. Since you already have a domain2 fwding to domain1 (if you've since deleted re-add with zmprov cad domain2.com domain1.com zimbraMailCatchAllForwardingAddress @domain1.com), now make people sending from 1 seem like 2:If you for some reason still want to move them one-by-one, references:
Zmprov - Zimbra :: Wiki
Zmprov Examples - Zimbra :: Wiki
[SOLVED] Looking for reporting output of names, accounts, lists, alias, etc.
Appendix A*Command-Line Utilities
Hi all!

Thx for the reply.

I've tried in my VirtualMachine, it worked by 50%.

My old domain domain1 has been renamed to the new domain - domain2.
I had to use the -l (--ldap) parameter. Otherwise it didn't work.
It worked lika charm, but now i have 2 problems:

I cannot create the virtualDomain domain1 (i need to have both domains working).

The line:
zmprov cad domain2.com domain1.com zimbraMailCatchAllForwardingAddress @domain1.com
just doesn't work, getting in return the zmprov help..

When i enter in the admin mode, editing the new domain, i get the error that the account documents@domain1 doesn't exists (i guess this error will go away when the line above is a sucess).


Does anyone as a clue why i cant add the virtualdomain ?

I don't see any error...

Code:
zmprov createAliasDomain domain1 domain2 zimbraMailCatchAllForwardingAddress @domain2

zmprov [args] [cmd] [cmd-args ...]

  -h/--help                             display usage
  -f/--file                             use file as input stream
  -s/--server   {host}[:{port}]         server hostname and optional port
  -l/--ldap                             provision via LDAP instead of SOAP
  -L/--logpropertyfile                  log4j property file, valid only with -l
  -a/--account  {name}                  account name to auth as
  -p/--password {pass}                  password for account
  -P/--passfile {file}                  read password from file
  -z/--zadmin                           use zimbra admin name/password from localconfig for admin/password
  -y/--authtoken {authtoken}            use auth token string(has to be in JSON format) from command line
  -Y/--authtokenfile {authtoken file}   use auth token string(has to be in JSON format) from command line
  -v/--verbose                          verbose mode (dumps full exception stack trace)
  -d/--debug                            debug mode (dumps SOAP messages)

 zmprov is used for provisioning. Try:

     zmprov help account         help on account-related commands
     zmprov help calendar        help on calendar resource-related commands
     zmprov help commands        help on all commands
     zmprov help config          help on config-related commands
     zmprov help cos             help on COS-related commands
     zmprov help domain          help on domain-related commands
     zmprov help list            help on distribution list-related commands
     zmprov help misc            help on misc commands
     zmprov help mailbox         help on mailbox-related commands
     zmprov help notebook        help on notebook-related commands
     zmprov help search          help on search-related commands
     zmprov help server          help on server-related commands
     zmprov help freebusy

Last edited by feiticeir0; 05-06-2010 at 08:48 AM..
Reply With Quote
  #10 (permalink)  
Old 05-06-2010, 11:19 AM
Senior Member
 
Posts: 63
Default

Well, this is importante, but, if no one has a clue, what about this solution:

I create the new domain @domain2

zmprov cd @domain2

create an alias, to every account in @domain1 to @domain2 (1200+)

and then, set the default domain

zmprov mcf zimbraDefaultDomainName @domain2

What about this solution ?

Another one:
instead of creating all the alias to the new domain, i create a virtualdomain, catching all address:
Quote:
zmprov cad domain2.com domain1.com zimbraMailCatchAllForwardingAddress @domain1.com
and next, setting this new domain as the default :
Quote:
zmprov mcf zimbraDefaultDomainName @domain2
Cheers,

Bruno

Last edited by feiticeir0; 05-06-2010 at 03:45 PM..
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.