I just got a report from a user to this effect:

 

I Added a MX record in the default domains. MX Record has distance 300 (looks fine in default domain manager)

When a new domain is added the default MX record has a distance of 0. Although this works it’s not the desired effect.

 

(I tried upgrading to ver 8.1 but this did not solve the problem.)

 

I think this patch should fix it but maybe not all records need the distance copied across?

 

--- vegadns-0.8.1/src/domains.php       Thu Jun 17 20:45:48 2004

+++ /vegadns-0.8.1-p/src/domains.php   Mon Aug 23 07:25:11 2004

@@ -257,11 +257,12 @@

         while(list($key,$row) = each($records_array)) {

             $host = ereg_replace("DOMAIN", $domain, $row['host']);

             $val = ereg_replace("DOMAIN", $domain, $row['val']);

-            $q = "insert into records (domain_id,host,type,val,ttl)

+            $q = "insert into records (domain_id,host,type,val,distance,ttl)

                 values('$id',

                 '".mysql_escape_string($host)."',

                 '".$row['type']."',

                 '$val',

+               '".$row['distance']."',

                 '".$row['ttl']."')";

             mysql_query($q) or die(mysql_error());

             dns_log($id, "added ".$row['type']." $host with value $val");

Reply via email to