Below script is to find email accounts for all domains –> to find for one domain fire command like this —> sh | grep
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}”;

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

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

execute the above script with  sh | grep domain

Leave a Reply

Your email address will not be published. Required fields are marked *

To Resolve this issue at just 5$ from ServerExpert

For Hosting please visit

You have Successfully Subscribed!

Open chat