I have made it!
To begin, I have installed the clean, fresh zimbra OSE to new server.
After that I wrote the script (shell+awk) to generate command file with zmprov to export account list with mailn parameters (name, password, givenName) to ahother server.
The awk script is:
#cat zmgetacc.awk
$2=="name"{printf "%s","/opt/zimbra/bin/zmprov ca "$3" 123 "}
$1=="displayName:"{printf "displayName \"%s %s",$2,$3"\""}
$1=="givenName:"{printf "%s"," givenName \""$2"\""}
$1=="sn:"{printf "%s"," sn \""$2"\""}
$1=="userPassword:"{print " userPassword "$2}
#
The process of accounts transfer is:
1. First step - get text dump of account at old server using zmprov
# su zimbra -c "/opt/zimbra/bin/zmprov gaa -v" > accounts-all.txt
(the su is neeeded as the bug workaround with non-correct set of LANG environment variable in zimbra system account and trouble to display/edit non-ascii symbols in zimbra account)
2. Second step - convert accounts dump to zmprov command file
# awk -f zmgetacc.awk accounts-all.txt > zmcracc.sh
Now we have command file zmcracc.sh with lines like
--
/opt/zimbra/bin/zmprov ca
abc@domain.com 123 displayName "ABC abcname" givenName "ABC" sn "ABC" userPassword {SSHA}+N+V8Yk8w0IgX9AoQWqcYqUbfEgxZBqp
--
3. Third step - create account on the new server.
Get the file zmcracc.sh by any method to the new server and run:
su zimbra -c "sh zmcracc.sh"
It requires about 1 second to each account (on my server) so after some minutes we have all accounts created on the new server.
So, all the accounts already works on the new server, and the rest (if needed) is to run imapsync to move content of select mailboxes to new server.