I just migrated a web site from one server to another and this domain also has 50+ e-mail accounts. I open new accounts on the new server with same passwords.
I changed DNS pointing to new server.
I am also keeping the old one now in order to miss any e-mail if the e-mail arrives that server.
I am wondering if that's a good idea or not? what should I do here to prevent any e-mail delivery errors if I remove my old app from the old server.
UPDATE
I have just checked the mailboxes on the old server and there are still some e-mail coming there. It has been 12 hours since I changed the DNS.
Well, that's a quite complex question.
It looks like you have only one mail server for your domain, which is not a good idea - the best practice is to have multiple mail servers with different preference value (in DNS), so when the master goes down, a slave server will collect all your mails.
On the other hand, if you have only one mail server and it is down, the remote mail server should retry to send the e-mail after some pre-defined interval. And then retry again (and again...) - usually it will retry for a day or even more with exponentially growing intervals between the retries.
Your current setup will do the job too. You just have to think about synchronizing mailboxes between your 2 servers. There are some tools like imapsync, which unfortunately is a paid application now, but maybe you could use something similar.