randee

Member
Dec 16, 2003
22
0
151
Black Hills
Hi,
Does anyone know? Is there a list of all the email addresses on the cpanel server someplace?
Or is there a way to get such a list?

We're setting up a mail filter server that will do postfix (and more) before it sends the email through to the real mail server.
Having a current list of email addresses on this new filter server, would allow us to reject unknown users before they reach the final mail server.

But so far I can't find a list. I noticed there is a link in cpanel to send a email to everyone, but that hasn't helped me either...

thanks for any help,
Randee
 

adept2003

Well-Known Member
Aug 11, 2003
283
0
166
~ "/(extra|special)/data"
Since maildir email accounts can be found within each users mail directory, we can probably use the pattern
i.e. /home/[username]/mail/[domain-name]/[@prefix]

To get a list, you could do "locate /home/*/mail | grep tmp" I've greped the tmp folder since it usually doesn't have anything in it, so it should hopefully output 1 line per email address on the server. This is a far-from-ideal solution, since you'll need to ensure the slocate db is up-to-date, and write a script to clean up the output.

Hopefully there's a much easier way of achieving what you're after...
 

randee

Member
Dec 16, 2003
22
0
151
Black Hills
Thanks adept!, I do hope we can come up with something easy... like mysql db duplication that would be live and realtime... but I may also be dreaming! :)
 

ggriffit

Registered
Feb 13, 2007
3
0
151
I am not able to find how you could run the mail manage script on a hourly or daily basis and have that information stored in an text file. Did someone say this was possible?

Thanks.