Add to Favourites Add to Favourites    Print this Article Print this Article

I want the list of all E-Mail accounts on the server.

To list all Virtual E-Mail accounts on the server, a script like this can be used:

cd /etc/virtual
for d in `cat domains`; do
   if [ ! -s $d/passwd ]; then
   for u in `cat $d/passwd | cut -d: -f1`; do
       echo $u@$d
exit 0;

Keep in mind that this will just output all "virtual" E-Mail accounts.
There would also be 1 system account for each User, which can be taken from the /etc/virtual/domainowners file.

Was this answer helpful?

Also Read