Commit 31e0d151 authored by tbrehm's avatar tbrehm

Merged revisions 2911-2912 from stable branch.

parent 355efb9a
......@@ -76,7 +76,20 @@ class installer extends installer_base {
if(is_file($config_dir.'/'.$configfile)){
copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
}
copy('tpl/debian6_dovecot.conf.master',$config_dir.'/'.$configfile);
//* Get the dovecot version
exec('dovecot --version',$tmp);
$parts = explode('.',trim($tmp[0]));
$dovecot_version = $parts[0];
unset($tmp);
unset($parts);
//* Copy dovecot configuration file
if($dovecot_version == 2) {
copy('tpl/debian6_dovecot2.conf.master',$config_dir.'/'.$configfile);
} else {
copy('tpl/debian6_dovecot.conf.master',$config_dir.'/'.$configfile);
}
//* dovecot-sql.conf
$configfile = 'dovecot-sql.conf';
......
......@@ -308,12 +308,25 @@ class installer_dist extends installer_base {
caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
//* copy dovecot.conf
//* backup dovecot.conf
$configfile = 'dovecot.conf';
if(is_file("$config_dir/$configfile")){
copy("$config_dir/$configfile", "$config_dir/$configfile~");
}
copy('tpl/fedora_dovecot.conf.master',"$config_dir/$configfile");
//* Get the dovecot version
exec('dovecot --version',$tmp);
$parts = explode('.',trim($tmp[0]));
$dovecot_version = $parts[0];
unset($tmp);
unset($parts);
//* Copy dovecot configuration file
if($dovecot_version == 2) {
copy('tpl/fedora_dovecot2.conf.master',$config_dir.'/'.$configfile);
} else {
copy('tpl/fedora_dovecot.conf.master',$config_dir.'/'.$configfile);
}
//* dovecot-sql.conf
$configfile = 'dovecot-sql.conf';
......
......@@ -349,12 +349,25 @@ class installer_dist extends installer_base {
caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
//* copy dovecot.conf
//* backup dovecot.conf
$configfile = 'dovecot.conf';
if(is_file("$config_dir/$configfile")){
copy("$config_dir/$configfile", "$config_dir/$configfile~");
}
copy('tpl/opensuse_dovecot.conf.master',"$config_dir/$configfile");
//* Get the dovecot version
exec('dovecot --version',$tmp);
$parts = explode('.',trim($tmp[0]));
$dovecot_version = $parts[0];
unset($tmp);
unset($parts);
//* Copy dovecot configuration file
if($dovecot_version == 2) {
copy('tpl/opensuse_dovecot2.conf.master',$config_dir.'/'.$configfile);
} else {
copy('tpl/opensuse_dovecot.conf.master',$config_dir.'/'.$configfile);
}
//* dovecot-sql.conf
$configfile = 'dovecot-sql.conf';
......
......@@ -895,12 +895,25 @@ class installer_base {
caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
//* copy dovecot.conf
//* backup dovecot.conf
$configfile = 'dovecot.conf';
if(is_file($config_dir.'/'.$configfile)) {
copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
}
copy('tpl/debian_dovecot.conf.master',$config_dir.'/'.$configfile);
//* Get the dovecot version
exec('dovecot --version',$tmp);
$parts = explode('.',trim($tmp[0]));
$dovecot_version = $parts[0];
unset($tmp);
unset($parts);
//* Copy dovecot configuration file
if($dovecot_version == 2) {
copy('tpl/debian_dovecot2.conf.master',$config_dir.'/'.$configfile);
} else {
copy('tpl/debian_dovecot.conf.master',$config_dir.'/'.$configfile);
}
//* dovecot-sql.conf
$configfile = 'dovecot-sql.conf';
......
protocols = imap pop3
auth_mechanisms = plain login
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_privileged_group = vmail
ssl_cert = </etc/postfix/smtpd.cert
ssl_key = </etc/postfix/smtpd.key
passdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
userdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
plugin {
quota = dict:user::file:/var/vmail/%d/%n/.quotausage
sieve=/var/vmail/%d/%n/.sieve
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-userdb {
group = vmail
mode = 0600
user = vmail
}
user = root
}
protocol imap {
mail_plugins = quota imap_quota
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
mail_plugins = quota
}
protocol lda {
mail_plugins = sieve quota
}
\ No newline at end of file
protocols = imap pop3
auth_mechanisms = plain login
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_privileged_group = vmail
ssl_cert = </etc/postfix/smtpd.cert
ssl_key = </etc/postfix/smtpd.key
passdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
userdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
plugin {
quota = dict:user::file:/var/vmail/%d/%n/.quotausage
sieve=/var/vmail/%d/%n/.sieve
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-userdb {
group = vmail
mode = 0600
user = vmail
}
user = root
}
protocol imap {
mail_plugins = quota imap_quota
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
mail_plugins = quota
}
protocol lda {
mail_plugins = sieve quota
}
\ No newline at end of file
protocols = imap pop3
auth_mechanisms = plain login
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_privileged_group = vmail
ssl_cert = </etc/postfix/smtpd.cert
ssl_key = </etc/postfix/smtpd.key
passdb {
args = /etc/dovecot-sql.conf
driver = sql
}
userdb {
args = /etc/dovecot-sql.conf
driver = sql
}
plugin {
quota = dict:user::file:/var/vmail/%d/%n/.quotausage
sieve=/var/vmail/%d/%n/.sieve
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-userdb {
group = vmail
mode = 0600
user = vmail
}
user = root
}
protocol imap {
mail_plugins = quota imap_quota
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
mail_plugins = quota
}
protocol lda {
mail_plugins = sieve quota
}
\ No newline at end of file
protocols = imap pop3
auth_mechanisms = plain login
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_privileged_group = vmail
ssl_cert = </etc/postfix/smtpd.cert
ssl_key = </etc/postfix/smtpd.key
passdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
userdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
plugin {
quota = dict:user::file:/var/vmail/%d/%n/.quotausage
sieve=/var/vmail/%d/%n/.sieve
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-userdb {
group = vmail
mode = 0600
user = vmail
}
user = root
}
protocol imap {
mail_plugins = quota imap_quota
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
mail_plugins = quota
}
protocol lda {
mail_plugins = sieve quota
}
\ No newline at end of file
......@@ -75,7 +75,12 @@
jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, type : "getservertype"}, function(data) {
var selected = jQuery('#redirect_type').val();
if(data.servertype == "nginx"){
jQuery('#redirect_type option[value="R"]').hide();
jQuery("#redirect_type option[value='R']").attr('disabled','disabled');
jQuery('#redirect_type option[value="L"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="R,L"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="R=301,L"]').attr('disabled','disabled');
jQuery("#redirect_type option[value='R']").hide();
jQuery('#redirect_type option[value="L"]').hide();
jQuery('#redirect_type option[value="R,L"]').hide();
jQuery('#redirect_type option[value="R=301,L"]').hide();
......@@ -85,8 +90,18 @@
jQuery('#redirect_type option[value="redirect"]').show();
jQuery('#redirect_type option[value="permanent"]').show();
jQuery('#redirect_type option[value="last"]').attr('disabled',false);
jQuery('#redirect_type option[value="break"]').attr('disabled',false);
jQuery('#redirect_type option[value="redirect"]').attr('disabled',false);
jQuery('#redirect_type option[value="permanent"]').attr('disabled',false);
if(selected != "no" && selected != "" && selected != "last" && selected != "break" && selected != "redirect" && selected != "permanent") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected');
} else {
jQuery('#redirect_type option[value="last"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="break"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="redirect"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="permanent"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="last"]').hide();
jQuery('#redirect_type option[value="break"]').hide();
jQuery('#redirect_type option[value="redirect"]').hide();
......@@ -97,6 +112,11 @@
jQuery('#redirect_type option[value="R,L"]').show();
jQuery('#redirect_type option[value="R=301,L"]').show();
jQuery('#redirect_type option[value="R"]').attr('disabled',false);
jQuery('#redirect_type option[value="L"]').attr('disabled',false);
jQuery('#redirect_type option[value="R,L"]').attr('disabled',false);
jQuery('#redirect_type option[value="R=301,L"]').attr('disabled',false);
if(selected != "no" && selected != "" && selected != "R" && selected != "L" && selected != "R,L" && selected != "R=301,L") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected');
}
});
......
......@@ -48,12 +48,22 @@
jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, type : "getservertype"}, function(data) {
var selected = jQuery('#redirect_type').val();
if(data.servertype == "nginx"){
jQuery("#redirect_type option[value='R']").attr('disabled','disabled');
jQuery('#redirect_type option[value="L"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="R,L"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="R=301,L"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="R"]').hide();
jQuery('#redirect_type option[value="L"]').hide();
jQuery('#redirect_type option[value="R,L"]').hide();
jQuery('#redirect_type option[value="R=301,L"]').hide();
if(selected != "no" && selected != "" && selected != "last" && selected != "break" && selected != "redirect" && selected != "permanent") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected');
} else {
jQuery('#redirect_type option[value="last"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="break"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="redirect"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="permanent"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="last"]').hide();
jQuery('#redirect_type option[value="break"]').hide();
jQuery('#redirect_type option[value="redirect"]').hide();
......
......@@ -62,7 +62,12 @@
jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, type : "getservertype"}, function(data) {
var selected = jQuery('#redirect_type').val();
if(data.servertype == "nginx"){
jQuery('#redirect_type option[value="R"]').hide();
jQuery("#redirect_type option[value='R']").attr('disabled','disabled');
jQuery('#redirect_type option[value="L"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="R,L"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="R=301,L"]').attr('disabled','disabled');
jQuery("#redirect_type option[value='R']").hide();
jQuery('#redirect_type option[value="L"]').hide();
jQuery('#redirect_type option[value="R,L"]').hide();
jQuery('#redirect_type option[value="R=301,L"]').hide();
......@@ -72,8 +77,18 @@
jQuery('#redirect_type option[value="redirect"]').show();
jQuery('#redirect_type option[value="permanent"]').show();
jQuery('#redirect_type option[value="last"]').attr('disabled',false);
jQuery('#redirect_type option[value="break"]').attr('disabled',false);
jQuery('#redirect_type option[value="redirect"]').attr('disabled',false);
jQuery('#redirect_type option[value="permanent"]').attr('disabled',false);
if(selected != "no" && selected != "" && selected != "last" && selected != "break" && selected != "redirect" && selected != "permanent") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected');
} else {
jQuery('#redirect_type option[value="last"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="break"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="redirect"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="permanent"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="last"]').hide();
jQuery('#redirect_type option[value="break"]').hide();
jQuery('#redirect_type option[value="redirect"]').hide();
......@@ -84,6 +99,11 @@
jQuery('#redirect_type option[value="R,L"]').show();
jQuery('#redirect_type option[value="R=301,L"]').show();
jQuery('#redirect_type option[value="R"]').attr('disabled',false);
jQuery('#redirect_type option[value="L"]').attr('disabled',false);
jQuery('#redirect_type option[value="R,L"]').attr('disabled',false);
jQuery('#redirect_type option[value="R=301,L"]').attr('disabled',false);
if(selected != "no" && selected != "" && selected != "R" && selected != "L" && selected != "R,L" && selected != "R=301,L") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected');
}
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment