summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f99f5ae)
raw | patch | inline | side by side (parent: f99f5ae)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 May 2005 07:25:12 +0000 (07:25 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 May 2005 07:25:12 +0000 (07:25 +0000) |
plugins/admin/systems/class_servKolab.inc | patch | blob | history | |
plugins/admin/systems/servkolab.tpl | patch | blob | history |
index 0eaa262c77ff4873f655ee8c3ee133c198132902..232a0bb5037c7b51d085fdee6864537a73ff69fb 100644 (file)
var $postfix_mydestination = "\$domain";//<<<<<<<<<<<<<
var $postfix_mynetworks = "127.0.0.1/8";//ok
var $postfix_enable_virus_scan = "TRUE";//ok
- var $cyrus_quotawarn = "999";//ok
+ var $postfix_relayhost = "";
+ var $postfix_mxrelayenabled = true;
+ var $postfix_allow_unauthenticated = "false";
+ var $cyrus_quotawarn = "80";//ok
var $kolabFreeBusyFuture = "1";// ok
var $cyrus_admins = "TRUE";//<<<<<<<<<<<<<<<<
var $cyrus_imap = "TRUE";//ok
var $added = false;
var $remove = false;
var $attributes = array("postfix_mydomain", "postfix_mydestination",
- "postfix_mynetworks", "postfix_enable_virus_scan",
+ "postfix_mynetworks", "postfix_enable_virus_scan","postfix_relayhost","postfix_allow_unauthenticated",
"cyrus_admins", "cyrus_imap","kolabFreeBusyFuture",
"cyrus_pop3", "cyrus_imaps", "cyrus_pop3s", "cyrus_sieve",
"apache_allow_unauthenticated_fb", "proftpd_ftp",
function execute()
{
+
/* Fill templating stuff */
$smarty = get_smarty();
$display = "";
}
}
-
+ /* Check Relayhost and if we have MX lookup enabled*/
+ if((isset($_POST['NewHost'])) || (isset($_POST['DelHost'])))
+ {
+ $this->postfix_mxrelayenabled = $_POST['RelayMxSupport'] ;
+ }
+ if($this->postfix_relayhost[0]=="[")
+ {
+ $this->postfix_mxrelayenabled=false;
+ $this->postfix_relayhost = str_replace("[","",$this->postfix_relayhost);
+ $this->postfix_relayhost = str_replace("]","",$this->postfix_relayhost);
+ }
+ if($this->postfix_mxrelayenabled) {
+ $smarty->assign("RelayMxSupportCheck"," checked ");
+ } else {
+ $smarty->assign("RelayMxSupportCheck","");
+ }
/* Show tab dialog headers */
if ($this->is_account) {
/* call Add Acoount to add account */
function check()
{
+ error_reporting(E_ALL);
$message = array();
-
-
+ if(($this->kolabFreeBusyFuture=="")) {
+ $message[] = "Free/Busy settings -> Future days must be set.";
+ }elseif((($this->kolabFreeBusyFuture=="")<0)){
+ $message[] = "Free/Busy settings -> Future days must be a positiv value.";
+ }elseif(strcasecmp($this->kolabFreeBusyFuture,(int)$this->kolabFreeBusyFuture)){
+ $message[] = "Free/Busy settings -> Future days must be a value.";
+ }
+
if(!is_int((int)($this->cyrus_quotawarn))) {
- $message[] = "The given Quota settings value must be a number";
- }elseif(!(($this->cyrus_quotawarn<=100)&&($this->cyrus_quotawarn>=1))){
- $message[] = "Please choose a value between 1 and 100 for Quota settings";
+ $message[] = "Cyrus Quota settings -> The given Quota settings value must be a number.";
+ }elseif(!(($this->cyrus_quotawarn<=100)&&($this->cyrus_quotawarn>=0))){
+ $message[] = "Cyrus Quota settings -> Please choose a value between 1 and 100 for Quota settings.";
+ }elseif(strcasecmp($this->cyrus_quotawarn,(int)$this->cyrus_quotawarn)){
+ $message[] = "Cyrus Quota settings -> Future days must be a value.";
+ }
+
+ if(empty($this->postfix_mynetworks))
+ {
+ $message[] = "SMTP privileged networks -> No value is given.";
}
+ if(empty($this->postfix_relayhost))
+ {
+ $message[] = "SMTP smarthost/relayhost -> No value is given.";
+ }
+
return ($message);
}
$newattrs['apache-http'] = "FALSE";
else
$newattrs['apache-http'] = "TRUE";
+ if ($newattrs['postfix-allow-unauthenticated'] == 0)
+ $newattrs['postfix-allow-unauthenticated'] = "FALSE";
+ else
+ $newattrs['postfix-allow-unauthenticated'] = "TRUE";
if ($newattrs['apache-allow-unauthenticated-fb'] == 0)
$newattrs['apache-allow-unauthenticated-fb'] = "FALSE";
else
/* Reorder Host array, to get constant increasing index */
$newattrs['kolabHost'] = array();
+ /* Check Relayhost and if we have MX lookup enabled*/
+ if(isset($_POST['RelayMxSupport']))
+ $this->postfix_mxrelayenabled = true ;
+ else
+ $this->postfix_mxrelayenabled = false;
+ if(!$this->postfix_mxrelayenabled)
+ {
+ $newattrs['postfix-relayhost']="[".$this->postfix_relayhost."]";
+ }
+
/* If we want to add someone or do only changes on the settings ...*/
if(!$this->remove)
{
$ldap->cd ("k=kolab,".$this->config->current['BASE']);
$ldap->rmdir("k=kolab,".$this->config->current['BASE']);
+
}elseif ($ldap->dn_exists($this->kolabdn)) {
/* Ok there is already an extension, so we only need to add the changes and the new Host, (if it was a new host)*/
gosa_log("Modifying");
index 01b133f9c7a3109df90aae3d90418696b753f716..c0ba21491e8aa1894659b889d4341a23382407ce 100644 (file)
</tr>
<tr>
<td>
- <input name="cyrus_quotawarn" value="{$cyrus_quotawarn}" type="text" maxlength="2" size="3">%
+ <input name="cyrus_quotawarn" value="{$cyrus_quotawarn}" type="text" maxlength="3" size="4">%
</td>
<td>
Percentage to warn users
</tr>
<tr>
<td>
- <input name="kolabFreeBusyFuture" value="{$kolabFreeBusyFuture}" type="text" maxlength="2" size="3">
+ <input name="kolabFreeBusyFuture" value="{$kolabFreeBusyFuture}" type="text" maxlength="3" size="4">
When creating free/busy lists, include data from x days in the past
</td>
</tr>
</tr>
<tr>
<td>
- <input name="" value="1" type="checkbox" >
+ <input name="RelayMxSupport" value="1" type="checkbox" {$RelayMxSupportCheck}>
{t}Enable MX lookup for relayhost{/t}
</td>
</tr>
</tr>
<tr>
<td>
- <input name="" value="1" type="checkbox" >
+ <input name="postfix_allow_unauthenticated" value="1" type="checkbox" {$postfix_allow_unauthenticatedCheck}>
{t}Accept mail from other domains over non-authenticated SMTP{/t}
</td>
</tr>