For the emails you can either:
Archive, then restore to new server - the directory structure has to be the same, which isnt always the case eg: ISPConfig uses /var/vmail/[domain]/[email address]/maildir, but i have used/seen in the past /home/vmail/[domain]/[email address]/ with out maildir... etc.
Download a script and use it to login to each email account and copy to the new server using imap. The down side is you need to know the username/password, and tell it to do each account in turn - can be slow.
Or Just copy from one server to the new one - which is what i do, using WinSCP, this way i only copy what i want (trash etc can be left behind. I dont need to know users passwords, and it is quick. I just setup all the new email accounts on the new server and do a straight copy across, as for users passowrds i usually just dump from the mySQL vmail database and modify what i need to then upload into new database.. And make sure you change the owner/group of the newly created copied directories to vmail/vmail (5000).