Mass migration of greylisted mail to inbox

I’m migrating to another box and have dozens of greylisted email I want to simply move en masse to my inbox. How can this be done from the command line please? Thank you!

I assume you mean that mail has been sent to the spam folder (greylisting merely delays mail and discourages spam)

If it is only dozens you would be better just moving them using the mail client. You could also use the Roundcube web client in MIAB

If you feel able to take the command line approach, the IMAP folders are handled by Dovecot.

See here for some ideas on how to achieve using Dovecot admin tools.