#!/bin/sh
cd /etc/virtual
for i in `cat domains`; do
{
if [ ! -s $i/passwd ]; then
continue;
fi
for u in `cat $i/passwd | cut -d: -f1`; do
{
echo "$u@$i";
};
done;
};
done;
exit 0;
#!/bin/sh
USERS=/usr/local/directadmin/data/users
VIRTUAL=/etc/virtual
for ul in `ls ${USERS}/*/users.list`; do
{
r=`echo $ul | cut -d/ -f7`
echo "";
echo "Email Accounts for Reseller $r";
for u in `cat $ul; echo $r`; do
{
for d in `cat ${USERS}/$u/domains.list`; do
{
if [ ! -s ${VIRTUAL}/$d/passwd ]; then
continue;
fi
for e in `cat ${VIRTUAL}/$d/passwd | cut -d: -f1`; do
{
echo "$e@$d";
};
done;
};
done;
};
done;
};
done;
exit 0;