I need a list of all email accounts on the system


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


Top Level » Email » Exim

I need a list of all email accounts on the systemLast Modified: Dec 16, 2012, 10:52 pm
If you need to get a list of all created E-Mail accounts on your server, including domain pointers, you can use this basic script:

#!/bin/sh
for d in `cat /etc/virtual/domains`; do
{
       #system account
       S=`grep "^${d}:" /etc/virtual/domainowners | cut -d: -f2 | awk '{print $1;}'`
       if [ "${S}" != "" ]; then
               echo "${S}@${d}";
       fi

       if [ ! -s /etc/virtual/$d/passwd ]; then
               continue;
       fi

       for e in `cat /etc/virtual/$d/passwd | cut -d: -f1`; do
       {
               echo "${e}@${d}";
       };
       done;
};
done;
exit 0;

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