#1 (permalink)  
Old 07-02-2009, 06:32 AM
nileshparmar's Avatar
Registered User
 
Join Date: Nov 2007
Posts: 368
nileshparmar is an unknown quantity at this point
Arrow export email ids list

Hi

again i back after my long vacation

in cPanel/whm server there is one domain named myest.com & it has more than 500 email ids

now i want to export that email ids or any alternate way to get list of mail ids ?

please do reply
__________________
Sincerely!
Nilesh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-02-2009, 08:40 AM
cPanelEricE's Avatar
cPanel Staff (Administrator)
 
Join Date: Nov 2007
Location: Texas
Posts: 158
cPanelEricE is on a distinguished road
Howdy,

There are a quite a few ways of doing this. To offer you the best method, what are you planning to do with the list?

Thanks!
__________________
--Eric(E)

Using Enkompass compared to cPanel is like going to a MacDonald’s in France, sure they’ve got the same things we have over here, but it’s a little different.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-02-2009, 08:43 AM
nileshparmar's Avatar
Registered User
 
Join Date: Nov 2007
Posts: 368
nileshparmar is an unknown quantity at this point
Arrow

Quote:
Originally Posted by cpanelerice View Post
Howdy,

There are a quite a few ways of doing this. To offer you the best method, what are you planning to do with the list?

Thanks!
Just want to create mailing list
__________________
Sincerely!
Nilesh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-02-2009, 08:47 AM
cPanelEricE's Avatar
cPanel Staff (Administrator)
 
Join Date: Nov 2007
Location: Texas
Posts: 158
cPanelEricE is on a distinguished road
Howdy,

Easy enough:

Code:
cd /home(x)/user/mail/; ls -a|grep @|awk '{print $2}' FS="."
should do most of it. The only thing that might be off is the tld that you're using so in my case I added it to this:
Code:
 cd /home2/fishmail/mail/; ls -a|grep @|awk '{print $2}' FS="."|replace _net .net
you'll likely need to do the same for your .tld.
__________________
--Eric(E)

Using Enkompass compared to cPanel is like going to a MacDonald’s in France, sure they’ve got the same things we have over here, but it’s a little different.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-02-2009, 08:49 AM
nileshparmar's Avatar
Registered User
 
Join Date: Nov 2007
Posts: 368
nileshparmar is an unknown quantity at this point
Arrow

It's very tough to use , however i'll try to do this


you'll likely need to do the same for your .tld.

>> i do not understand this

cd /home(x)/user/mail/; ls -a|grep @|awk '{print $2}' FS="."

what should replace on (x)

Is there any easy way to do this ?
__________________
Sincerely!
Nilesh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-02-2009, 09:16 AM
cPanelEricE's Avatar
cPanel Staff (Administrator)
 
Join Date: Nov 2007
Location: Texas
Posts: 158
cPanelEricE is on a distinguished road
Howdy,

The reason I put "homeX" is some folks have more than one directory. If you don't it'll just be /home. You can get your home folder path from the cPanel page for that user under "Stats". It should look something like this image attached.
Attached Images
File Type: png HomeDir.png (1.9 KB, 5 views)
__________________
--Eric(E)

Using Enkompass compared to cPanel is like going to a MacDonald’s in France, sure they’ve got the same things we have over here, but it’s a little different.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 07-05-2009, 10:57 PM
Registered User
 
Join Date: Jul 2009
Posts: 1
gmaegarro is on a distinguished road
Thank you for your discussion. The same problem happened to me. It is very helpful to me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 07-06-2009, 07:52 AM
cPanelEricE's Avatar
cPanel Staff (Administrator)
 
Join Date: Nov 2007
Location: Texas
Posts: 158
cPanelEricE is on a distinguished road
I'm glad it helped. I came back and added tags to make it more search-able.
__________________
--Eric(E)

Using Enkompass compared to cPanel is like going to a MacDonald’s in France, sure they’ve got the same things we have over here, but it’s a little different.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 07-06-2009, 08:24 AM
Spiral's Avatar
Registered User
 
Join Date: Jun 2005
Location: Area 51
Posts: 1,476
Spiral is on a distinguished road
Thumbs up

Just a basic expansion on the code line given earlier in this thread
so it functions as a simple global mail account listing script:
Code:
#!/bin/bash
IFS="$"

cd /home    #Just a nice starting point

ls /var/cpanel/users | while read MUSER; do
  MHOME=$(grep "${MUSER}:" /etc/passwd | cut -d':' -f6 | head -1)
  cd ${MHOME}/mail/
  ls -a | grep '@' | awk '{print $2}' FS="." | replace '_' '.'
done
Basically reads the list of valid usernames and home directories
of each of the users on the server and then displays all the email
accounts that have been created for each irregardless of where the
home folders are actually stored for each account.

Don't forget that this will only give you a list of email accounts,
to find out if any additional mail aliases have been setup or alternate
names for these accounts, you will want to also look at each of
the files listed under /etc/valiases where you will find a file named
for each domain on the server and in that file the list of aliases
that have been setup for that specific domain.

Last edited by Spiral; 07-07-2009 at 03:50 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 07-06-2009, 08:45 AM
cPanelEricE's Avatar
cPanel Staff (Administrator)
 
Join Date: Nov 2007
Location: Texas
Posts: 158
cPanelEricE is on a distinguished road
showoff :P, I mean nice work
__________________
--Eric(E)

Using Enkompass compared to cPanel is like going to a MacDonald’s in France, sure they’ve got the same things we have over here, but it’s a little different.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
export user list , smtp

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
export client list and details kimon cPanel Newbies 1 01-19-2009 07:00 PM
Need a script to export list of all emails. jetnet cPanel and WHM Discussions 4 11-06-2007 09:42 AM
Need to export subscribers to a mailman list Jeff75 cPanel and WHM Discussions 1 12-27-2005 10:48 PM
Export Mailman list emails gourou76 cPanel and WHM Discussions 0 09-25-2005 08:52 AM
export list domains in Excel? asmar cPanel and WHM Discussions 0 09-08-2005 05:44 PM


All times are GMT -5. The time now is 02:34 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc