I'm going to assume you mean, locally. That is, I assume you don't mean you're trying to figure out if firstname.lastname@example.org has a GMail account. Instead you're trying to figure out, of the people who can log into the bongo.yourcorp.com machine, which of them have email accounts.
Quite simply, all of them.
On Unix, all users by default can receive mail. So the "names of the email accounts" is the same as "all users". You presumably know how many local users there are because you just migrated them all from Debian to CentOS.
If, instead, you're talking about remote mail users who receive email via IMAP or POP, then you just need to check your IMAP/POP service; it will, presumably, find a way to enumerate the mailboxes. If you're using mbox-format mailboxes you can figure out which of the valid mailboxes are non-empty by looking in
/var/spool/mail. If you want to figure out which empty mailboxes are still valid, you will need to check your IMAP/POP server configuration. It's hard to help you more on this part because you didn't state what method was being used to send/receive email.
This answer was perhaps less helpful that it could have been because your question was vague. What, specifically, are you trying to achieve? What do you mean precisely by "active email accounts" and what are you trying to do with them?