[BUG] Be very carefull when rebuilding /etc/virtual/domains

websafe

Verified User
Joined
Jun 15, 2010
Messages
103
Location
Opole, PL
Today on one of my servers the root partition went full and this caused `/etc/virtual/domains` and `/etc/virtual/domainowners` to be nulled.

I've rebuilt both these files but You should be very careful, because the official rebuild-script, published here http://help.directadmin.com/item.php?id=113 has a problem.

This script will put ALL found domains into `/etc/virtual/domains`, even those which initially had the "Local Mail Server" option DISABLED:

Code:
Local Mail Server
  Use this server to handle my emails. 
  If not, change the MX record and uncheck this option.

(/CMD_DNS_MX?domain=domain.com)


Using the official rebuild-script will re-enable "Use this server to handle email" for each domain. This can bring trouble. I have multiple domains on this server, with external MX records, and after rebuilding I was no longer able to send mails thru this server to these domains.

Of course I was able to repair this problem for my domains, which I knew should be external, but what with other users? I'll have probably to wait for coming tickets.

I did a quick research and IMHO this option (Local Mail Server) is enabled/disabled for each domain by simply checking if the given domain exists in `/etc/virtual/domains`. If a domain is not found in `/etc/virtual/domains` then DA assumes "Local Mail Server" as disabled.

I think it would be safer to store this option additionally somewhere else,
for example in `/usr/local/directadmin/data/users/myuser/domains/mydomain.conf` as "local_mail_server=yes|no".


Or is there something I didn't notice?
 
Last edited:
Hello,

Yes, your research results are valid. That's really so and directamin checks only existence of a domain in /etc/virtual/domains. I like your idea and I hope John will implement it in a future release.
 
I have experienced the same problem. Its great if it can be made better.
 
Back
Top