/cpanel-emails

This script retrieves & prints a list of all the email addresses created in a cPanel server.

Primary LanguageJavaScript

cpanel-emails

This script retrieves & prints a list of all the email addresses created in a cPanel server. The list consists of lines formatted as: owner,user,email.

Requirements

Installation & configuration

Clone this project and install the package:

git clone git@github.com:luissquall/whm-emails.git
cd whm-emails
npm install

Copy config. template and set program settings:

cp config.json.default config.json
vim config.json

Execution

Let it be:

chmod u+x cli.js
./cli.js
# Save the list in a file
./cli.js > emails.csv

Settings

How does it work?

The program requests a list of all the accounts in the server, extracts the users from the list and issues a new request per user to Email::listpopssingle to obtain all email accounts from the user's account.