Support Center > Knowledgebase > DirectAdmin > eMail > I want the list of all E-Mail accounts on the server.
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:
#!/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.
Also Read