I currently have my mail server running on osx.
I have setup MIAB server and its configured.
The mac mail server uses dovecot to handle mail as does the MIAB.
Its it possible to use the dovecot admin tools to copy the contents of the mailboxes across to the MIAB.
Or is there another way?
In theory you could just load up you MIAB account in your mail software, then copy/paste your emails into the new account.
otherwise: https://wiki.dovecot.org/Tools/Doveadm/Import seems to be the perfect resource.
For what it’s worth, I have never gotten Dovecot’s import/sync tools to work or do anything useful. Using an email program like Mozilla Thunderbird and setting up two IMAP accounts simultaneously and then copying mails from one to the other, as @murgero suggests, is the best way I’ve been able to do this. There are also command-line IMAP sync tools but they are harder to use.