Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I had a Debian Sarge server running Plesk 8.1 and moved to a CentOS server running cPanel. I do not remember how many email accounts were there. Using the terminal, how can I see how many active email accounts there are on the old server?

Also is there any way to backup the email data for each account and to move the data to my new CentOS installation?

share|improve this question
add comment

2 Answers

For your original Debian Plesk server, list all email accounts like this.

To migrate accounts from Plesk to cPanel follow this guide. You'll want to migrate entire accounts, not just email accounts. The wizard in cPanel is actually surprisingly good for migrating things in from other control panel endowed servers.

share|improve this answer
add comment

I'm going to assume you mean, locally. That is, I assume you don't mean you're trying to figure out if wilma@bongo.yourcorp.com 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?

share|improve this answer
    
You are correct in everything you say, although you missed the crux of the question slightly. The OP is on cPanel and Plesk servers, both of which manage email outside of Unix accounts. This is really just a Plesk to cPanel migration. –  SimonJGreen Mar 4 '12 at 17:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.