Lately I’ve been dealing a lot with email accounts in cPanel: Bulk change cPanel mailbox quota for all email ✉️ accounts and Bulk delete ✉️ email forwarders in cPanel.
Here is how to bulk create email accounts in cPanel under a single domain name.
First, let’s create a list of user accounts and passwords separated by colon:
cat users-list.txt
user1:3HVQw6KzSy28-tuK
user2:#2?kGZdr8N)e+K}S
user3:&Qa[;K49>%Dh4G)"
user4:'Ls;z/4;.pCT"=,K
user5:7N\[]m(hc![/,'b@
user6:%mBpwuz6R"+=EF-S
user7:SA_;k<,)j6`/V.6M
Then a shell script
for i in `cat users-list.txt`; do /scripts/addpop `echo $i|awk -F":" {'print $1'}`@domain.com `echo $i|awk -F":" {'print $2'}`;done
This will set unlimited quota for all acoounts, to set a specific mailbox quota use -quota option:
for i in `cat users-list.txt`; do /scripts/addpop `echo $i|awk -F”:” {‘print $1’}`@domain.com `echo $i|awk -F”:” {‘print $2’}` –quota 100M;done
Email accounts will be created and the output will be::
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
To bulk delete all email accounts from a list, create another list:
cat delete-list.txt
then put the accounts in the following format:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
and then use the following shell script:
for i in `cat delete-list.txt`; do /usr/local/cpanel/scripts/delpop $i ;done

![WARNING: [pool user_USERNAME] server reached pm.max_children setting (25), consider raising it Screen Shot 2020 06 23 at 09.57.51 - WARNING: [pool user_USERNAME] server reached pm.max_children setting (25), consider raising it](https://i0.wp.com/administrator.pejcic.rs/wp-content/uploads/2026/09/Screen-Shot-2020-06-23-at-09.57.51.png?resize=344%2C194&ssl=1)

![node[175421]: pthread_create: Resource temporarily unavailable 2023 08 28 12 15 - node[175421]: pthread_create: Resource temporarily unavailable](https://i0.wp.com/administrator.pejcic.rs/wp-content/uploads/2023/08/2023-08-28_12-15.png?resize=344%2C194&ssl=1)