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


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » Email

I want the list of all E-Mail accounts on the server.Last Modified: Jun 17, 2015, 5:08 pm
To list all Virtual E-Mail accounts on the server, a script like this can be used:

#!/bin/sh
cd /etc/virtual
for d in `cat domains`; do
{
   if [ ! -s $d/passwd ]; then
       continue;
   fi
   for u in `cat $d/passwd | cut -d: -f1`; do
   {
       echo $u@$d
   };
   done;
};
done;
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.

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST