I want to move some Mailbox directories to a new disk while postfix and courier imap daemons are still running.
The question is ¿what happens if a new mail is recieved into the Mailbox while moving the files? ¿is it safe?
Don't do it if you're using Mailbox files. If you were using Maildir you could do at least some of the work without shutting the services down.
Every email that is delivered, and every IMAP access, will alter the Mailbox files. You may end up with corrupted files.
The best you can do is to shut off IMAP and local delivery, while still allowing postfix to queue incoming mails. Then, once the move is finished, turn local delivery back on and all the queued mails will be delivered.
No it's not safe.
Declare a service window and schedule downtime. Your secondary MX will cache incoming mail and your users can do without, for a couple of hours even, if you schedule your maintenance window well.
rsync to copy the existing mail spool to your new disk and time how long a second run takes to determine the needed downtime. If your incremental rsync run for instance takes 4 hours, you need 5 hours of scheduled downtime. Start an rsync again 5-6 hours before the start of your downtime. If it doesn't complete before the actual start of your maintenance window, that's a No Go and reschedule.
If it does, then start your scheduled maintenance