imap rsync between directadmin servers

1- login to old server containing data

2- cd /home

ls -1

cp to a text file

delete unwanted users in that file

3- login to new server

ssh-copy-id root@old.ser.ver.ip

nano list.txt

enter user list one in a line

4- nano imap-sync

for E in `cat list.txt`; do rsync -ave 'ssh -p 22' 37.247.xx.xx:/home/$E/imap/ /home/$E/imap/ ; done

sh imap-sync

5- cd /usr/local/directadmin/scripts
./set_permissions.sh all

done!