List all POP3 account

I think this is the script you are looking for...

Code:
for DOMAIN in $(find /etc/virtual/* -maxdepth 0 -type d ! -type l ! -name '*_off' ! -name 'usage' ! -name 'majordomo' -printf '%f \n'); do { for USER in $(cut -d: -f1 /etc/virtual/${DOMAIN}/quota); do { echo ${USER}@${DOMAIN} >> /root/activePopAccounts.txt; }; done; }; done;

If you run this script from your command prompt, then the email accounts will be outputted to this file: /root/activePopAccounts.txt

This is the original thread: http://www.directadmin.com/forum/showthread.php?t=16040
 
Back
Top