Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: [SOLVED] Virtual Domain and main domain

  1. #1
    Join Date
    Oct 2008
    Location
    Portugal, Castelo Branco
    Posts
    63
    Rep Power
    6

    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

  2. #2
    Join Date
    Oct 2008
    Location
    Portugal, Castelo Branco
    Posts
    63
    Rep Power
    6

    Default

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

    Cheers

  3. #3
    Join Date
    Sep 2009
    Location
    Spain
    Posts
    233
    Rep Power
    6

    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.

  4. #4
    Join Date
    Oct 2008
    Location
    Portugal, Castelo Branco
    Posts
    63
    Rep Power
    6

    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 ?

  5. #5
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    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:
    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
    http://www.zimbra.com/forums/adminis...alias-etc.html
    Appendix A*Command-Line Utilities

  6. #6
    Join Date
    Sep 2009
    Location
    Spain
    Posts
    233
    Rep Power
    6

    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.

  7. #7
    Join Date
    Sep 2009
    Location
    Spain
    Posts
    233
    Rep Power
    6

    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.

  8. #8
    Join Date
    Oct 2008
    Location
    Portugal, Castelo Branco
    Posts
    63
    Rep Power
    6

    Default

    Thx all for the replys.

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

    Cheers,

    Bruno Santos

  9. #9
    Join Date
    Oct 2008
    Location
    Portugal, Castelo Branco
    Posts
    63
    Rep Power
    6

    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
    http://www.zimbra.com/forums/adminis...alias-etc.html
    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.

  10. #10
    Join Date
    Oct 2008
    Location
    Portugal, Castelo Branco
    Posts
    63
    Rep Power
    6

    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:
    zmprov cad domain2.com domain1.com zimbraMailCatchAllForwardingAddress @domain1.com
    and next, setting this new domain as the default :
    zmprov mcf zimbraDefaultDomainName @domain2
    Cheers,

    Bruno
    Last edited by feiticeir0; 05-06-2010 at 03:45 PM.

Similar Threads

  1. Main Domain
    By osiris in forum Administrators
    Replies: 5
    Last Post: 02-08-2008, 07:00 AM
  2. Replies: 7
    Last Post: 10-05-2007, 03:14 PM
  3. Virtual Domain
    By rmvg in forum Administrators
    Replies: 0
    Last Post: 09-30-2007, 07:27 AM
  4. [SOLVED] Remove main domain!
    By zibra in forum Administrators
    Replies: 11
    Last Post: 09-27-2007, 08:50 AM
  5. Using Virtual domain name in Outlook
    By russgalleywood in forum Zimbra Connector for Outlook
    Replies: 3
    Last Post: 06-12-2007, 08:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •