Many thanks scott.serr, with your help I carried out the first step successfully. To confirm:
1. I login as zimbra on old server, copy and paste the code
[zimbra@mail ~]$ zmprov getAlldomains
[zimbra@mail ~]$ echo "# Create domains"
# Create domains
[zimbra@mail ~]$ for f in $(zmprov getAllDomains); do
> echo "zmprov createDomain $f"
zmprov createDomain spt.vn
I also looked for basic "for loop" and understand the first piece now . Now I understand that the output of first script is a file containing commands to create domains and accounts as well as password?
I don't need to export and import email, so i don't need the second script, do I?
Another question, password is encrypted so how can we import it to new zimbra server?
One again, I truly appreciate your help.