cat /etc/userdomains | sed "s/://g" | awk {'system("ls -1d /home/"$2"/mail/"$1"/* 2> /dev/null")'} | sed "s/\// /g" | awk {'print $5"@"$4'}
The above command will print our every email address in the server.
* Don’t forget you’ll want the email aliases aswell (found under /etc/valiases/).
Reference: https://forums.cpanel.net/threads/export-list-of-all-email-addresses.351951/