Support for exporting to an ISC BIND9 name server
[freeside.git] / FS / FS / part_export.pm
index 4471d6e..d898d26 100644 (file)
@@ -718,18 +718,30 @@ tie my %vpopmail_options, 'Tie::IxHash',
 ;
 
 tie my %bind_options, 'Tie::IxHash',
-  #'machine'    => { label=>'named machine' },
-  'named_conf' => { label  => 'named.conf location',
-                    default=> '/etc/bind/named.conf' },
-  'zonepath'   => { label => 'path to zone files',
-                    default=> '/etc/bind/', },
+  #'machine'     => { label=>'named machine' },
+  'named_conf'   => { label  => 'named.conf location',
+                      default=> '/etc/bind/named.conf' },
+  'zonepath'     => { label => 'path to zone files',
+                      default=> '/etc/bind/', },
+  'bind_release' => { label => 'ISC BIND Release',
+                      type  => 'select',
+                      options => [qw(BIND8 BIND9)],
+                      default => 'BIND8' },
+  'bind9_minttl' => { label => 'The minttl required by bind9 and RFC1035.',
+                      default => '1D' },
 ;
 
 tie my %bind_slave_options, 'Tie::IxHash',
-  #'machine'    => { label=> 'Slave machine' },
-  'master'      => { label=> 'Master IP address(s) (semicolon-separated)' },
-  'named_conf'  => { label   => 'named.conf location',
-                     default => '/etc/bind/named.conf' },
+  #'machine'     => { label=> 'Slave machine' },
+  'master'       => { label=> 'Master IP address(s) (semicolon-separated)' },
+  'named_conf'   => { label   => 'named.conf location',
+                      default => '/etc/bind/named.conf' },
+  'bind_release' => { label => 'ISC BIND Release',
+                      type  => 'select',
+                      options => [qw(BIND8 BIND9)],
+                      default => 'BIND8' },
+  'bind9_minttl' => { label => 'The minttl required by bind9 and RFC1035.',
+                      default => '1D' },
 ;
 
 tie my %http_options, 'Tie::IxHash',
@@ -815,6 +827,18 @@ tie my %ldap_options, 'Tie::IxHash',
   'radius'     => { label=>'Export RADIUS attributes', type=>'checkbox', },
 ;
 
+tie my %forward_shellcommands_options, 'Tie::IxHash',
+  'user' => { lable=>'Remote username', default=>'root' },
+  'useradd' => { label=>'Insert command',
+                 default=>'',
+               },
+  'userdel'  => { label=>'Delete command',
+                  default=>'',
+                },
+  'usermod'  => { label=>'Modify command',
+                  default=>'',
+                },
+;
 
 #export names cannot have dashes...
 %exports = (
@@ -873,7 +897,7 @@ tie my %ldap_options, 'Tie::IxHash',
     'sqlmail' => {
       'desc' => 'Real-time export to SQL-backed mail server',
       'options' => \%sqlmail_options,
-      'nodomain' => 'N',
+      'nodomain' => '',
       'notes' => 'Database schema can be made to work with Courier IMAP and Exim.  Others could work but are untested. (...extended description from pc-intouch?...)',
     },
 
@@ -935,7 +959,7 @@ tie my %ldap_options, 'Tie::IxHash',
     'domain_shellcommands' => {
       'desc' => 'Run remote commands via SSH, for domains.',
       'options' => \%domain_shellcommands_options,
-      'notes'    => 'Run remote commands via SSH, for domains.  You will need to <a href="../docs/ssh.html">setup SSH for unattended operation</a>.',
+      'notes'    => 'Run remote commands via SSH, for domains.  You will need to <a href="../docs/ssh.html">setup SSH for unattended operation</a>.<BR><BR>Use these buttons for some useful presets:<UL><LI><INPUT TYPE="button" VALUE="qmail catchall .qmail-domain-default maintenance" onClick=\'this.form.useradd.value = "[ \"$uid\" -a \"$gid\" -a \"$dir\" -a \"$qdomain\" ] && [ -e $dir/.qmail-$qdomain-default ] || { touch $dir/.qmail-$qdomain-default; chown $uid:$gid $dir/.qmail-$qdomain-default; }"; this.form.userdel.value = ""; this.form.usermod.value = "";\'></UL>',
     },
 
 
@@ -948,6 +972,12 @@ tie my %ldap_options, 'Tie::IxHash',
       #'nodomain' => 'Y',
       'notes' => 'Database schema can be made to work with Courier IMAP and Exim.  Others could work but are untested. (...extended description from pc-intouch?...)',
     },
+
+    'forward_shellcommands' => {
+      'desc' => 'Run remote commands via SSH, for forwards',
+      'options' => \%forward_shellcommands_options,
+      'notes' => 'Run remote commands via SSH, for forwards.  You will need to <a href="../docs/ssh.html">setup SSH for unattended operation</a>.<BR><BR>Use these buttons for some useful presets:<UL><LI><INPUT TYPE="button" VALUE="text vpopmail maintenance" onClick=\'this.form.useradd.value = "[ -d /home/vpopmail/domains/$domain/$username ] && { echo \"$destination\" > /home/vpopmail/domains/$domain/$username/.qmail; chown vpopmail:vchkpw /home/vpopmail/domains/$domain/$username/.qmail; }"; this.form.userdel.value = "rm /home/vpopmail/domains/$domain/$username/.qmail"; this.form.usermod.value = "mv /home/vpopmail/domains/$old_domain/$old_username/.qmail /home/vpopmail/domains/$new_domain/$new_username; [ \"$old_destination\" != \"$new_destination\" ] && { echo \"$new_destination\" > /home/vpopmail/domains/$new_domain/$new_username/.qmail; chown vpopmail:vchkpw /home/vpopmail/domains/$new_domain/$new_username/.qmail; }";\'></UL>',
+    },
   },
 
   'svc_www' => {