My /etc/virtual/domainowners file is empty. How do I rebuild it?


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


Top Level » Email » Repair Broken or Missing

My /etc/virtual/domainowners file is empty. How do I rebuild it?Last Modified: Apr 22, 2005, 10:51 am
Create a script with the following contents by running:

cd /etc/virtual
vi fix_domainowners.sh


press i to go into "insert" mode, then paste the following code:


#!/bin/sh

for u in `ls /usr/local/directadmin/data/users`; do
{
          for d in `cat /usr/local/directadmin/data/users/$u/domains.list`; do
          {
                    echo "$d: $u"

                    for p in `cat /usr/local/directadmin/data/users/$u/domains/$d.pointers | cut -d= -f1 2>/dev/null`; do
                    {
                              echo "$p: $u"
                    }
                    done;
          }
          done;
}
done;

Press ctrl-c to exit "insert" mode, the press shift-Z twice to save and exit.  Once at the prompt, type:

chmod 755 fix_domainowners.sh
./fix_domainowners.sh > domainowners
chmod 644 domainowners
chown mail:mail domainowners

 
Related Helpfiles
How to completely rebuild your /etc/virtual directory
My /etc/virtual/domains file is empty. How do I rebuild it?

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