steffen: server/kolab-webadmin/kolab-webadmin/www/admin/service index.php, 1.8, 1.9
cvs at intevation.de
cvs at intevation.de
Mon Sep 6 23:50:07 CEST 2004
Author: steffen
Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/service
In directory doto:/tmp/cvs-serv19442/kolab-webadmin/www/admin/service
Modified Files:
index.php
Log Message:
postfix relayhost, thanks to Matt Douhan
Index: index.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/service/index.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- index.php 6 Sep 2004 20:45:25 -0000 1.8
+++ index.php 6 Sep 2004 21:50:05 -0000 1.9
@@ -40,6 +40,8 @@
global $quotawarn;
global $postfixmynetworks;
global $postfixallowunauth;
+ global $postfixrelayhost;
+ global $postfixrelayhostmx;
global $kolabhost;
// Get values from LDAP
@@ -57,6 +59,15 @@
$quotawarn = $attrs['cyrus-quotawarn'][0];
$postfixmynetworks = $attrs['postfix-mynetworks'][0];
$postfixallowunauth = $attrs['postfix-allow-unauthenticated'][0];
+ $postfixrelayhost = $attrs['postfix-relayhost'][0];
+ if( ereg( '\\[(.+)\\]', $postfixrelayhost, $regs ) ) {
+ $postfixrelayhost = $regs[1];
+ $postfixrelayhostmx = 'false';
+ } else if( $postfixrelayhost != '' ) {
+ $postfixrelayhostmx = 'true';
+ } else {
+ $postfixrelayhostmx = 'false';
+ }
$kolabhost = $attrs['kolabHost'];
unset( $kolabhost['count'] );
ldap_free_result($result);
@@ -114,6 +125,21 @@
}
}
+if( $_REQUEST['submitpostfixrelayhost'] ) {
+ $value = trim( $_REQUEST['postfixrelayhost'] );
+ if( $value != '' && !isset( $_REQUEST['postfixrelayhostmx'] ) ) {
+ $value = "[$value]";
+ }
+ if( $value == '' ) $value = array();
+ $attrs = array();
+ $attrs['postfix-relayhost'] = $value;
+ if( !($result = ldap_modify($ldap->connection, "k=kolab,".$_SESSION['base_dn'], $attrs)) ) {
+ $errors[] = _("LDAP Error: failed to modify kolab configuration object: ")
+ .ldap_error($ldap->connection);
+ }
+}
+
+
if( $_REQUEST['deletekolabhost'] ) {
extract_ldap_values();
$key = array_search($_REQUEST['akolabhost'],$kolabhost);
@@ -160,6 +186,8 @@
$smarty->assign( 'quotawarn', $quotawarn );
$smarty->assign( 'postfixmynetworks', $postfixmynetworks );
$smarty->assign( 'postfixallowunauth', toboolstr($postfixallowunauth) );
+$smarty->assign( 'postfixrelayhost', $postfixrelayhost );
+$smarty->assign( 'postfixrelayhostmx', $postfixrelayhostmx );
$smarty->assign( 'kolabhost', $kolabhost );
$smarty->assign( 'menuitems', $menuitems );
$smarty->assign( 'submenuitems',
More information about the commits
mailing list