Commit 5cbfd762 authored by Till Brehm's avatar Till Brehm

Merge branch 'develop' of git.ispconfig.org:ispconfig/ispconfig3 into develop

parents 709789a4 92fc3734
Pipeline #5472 passed with stage
in 12 seconds
......@@ -13,6 +13,10 @@ $autoinstall['http_server'] = 'nginx'; // apache (default), nginx
$autoinstall['ispconfig_port'] = '8080'; // default: 8080
$autoinstall['ispconfig_use_ssl'] = 'y'; // y (default), n
$autoinstall['ispconfig_admin_password'] = 'admin'; // default: admin
$autoinstall['create_ssl_server_certs'] = 'y';
$autoinstall['ignore_hostname_dns'] = 'n';
$autoinstall['ispconfig_postfix_ssl_symlink'] = 'y';
$autoinstall['ispconfig_pureftpd_ssl_symlink'] = 'y';
/* SSL Settings */
$autoinstall['ssl_cert_country'] = 'AU';
......@@ -52,6 +56,10 @@ $autoupdate['reconfigure_services'] = 'yes'; // yes (default), no
$autoupdate['ispconfig_port'] = '8080'; // default: 8080
$autoupdate['create_new_ispconfig_ssl_cert'] = 'no'; // no (default), yes
$autoupdate['reconfigure_crontab'] = 'yes'; // yes (default), no
$autoupdate['create_ssl_server_certs'] = 'y';
$autoupdate['ignore_hostname_dns'] = 'n';
$autoupdate['ispconfig_postfix_ssl_symlink'] = 'y';
$autoupdate['ispconfig_pureftpd_ssl_symlink'] = 'y';
/* These are for service-detection (defaulting to old behaviour where alle changes were automatically accepted) */
$autoupdate['svc_detect_change_mail_server'] = 'yes'; // yes (default), no
......
......@@ -12,6 +12,10 @@ http_server=apache
ispconfig_port=8080
ispconfig_use_ssl=y
ispconfig_admin_password=admin
create_ssl_server_certs=y
ignore_hostname_dns=n
ispconfig_postfix_ssl_symlink=y
ispconfig_pureftpd_ssl_symlink=y
[ssl_cert]
ssl_cert_country=AU
......@@ -51,6 +55,10 @@ reconfigure_services=yes
ispconfig_port=8080
create_new_ispconfig_ssl_cert=no
reconfigure_crontab=yes
create_ssl_server_certs=y
ignore_hostname_dns=n
ispconfig_postfix_ssl_symlink=y
ispconfig_pureftpd_ssl_symlink=y
; These are for service-detection (defaulting to old behaviour where alle changes were automatically accepted)
svc_detect_change_mail_server=yes
......
......@@ -582,7 +582,7 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Install ISPCon
// Create SSL certs for non-webserver(s)?
if(!file_exists('/usr/local/ispconfig/interface/ssl/ispserver.crt')) {
if(!$issue_tried && strtolower($inst->simple_query('Do you want to create SSL certs for your server?', array('y', 'n'), 'y')) == 'y') {
if(!$issue_tried && strtolower($inst->simple_query('Do you want to create SSL certs for your server?', array('y', 'n'), 'y','create_ssl_server_certs')) == 'y') {
$inst->make_ispconfig_ssl_cert();
}
} else {
......
......@@ -391,6 +391,9 @@ class installer_base {
}
}
// preserve needed values in $conf (should just array_merge $tpl_ini_array into $conf?)
$conf['mail']['content_filter'] = $tpl_ini_array['mail']['content_filter'];
$server_ini_content = array_to_ini($tpl_ini_array);
$mail_server_enabled = ($conf['services']['mail'])?1:0;
......@@ -1475,7 +1478,7 @@ class installer_base {
}
$new_options[] = $value;
}
if ($configure_lmtp) {
if ($configure_lmtp && $conf['mail']['content_filter'] === 'amavisd') {
for ($i = 0; isset($new_options[$i]); $i++) {
if ($new_options[$i] == 'reject_unlisted_recipient') {
array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:${quoted_config_dir}/mysql-verify_recipients.cf"));
......@@ -3043,7 +3046,7 @@ class installer_base {
exec("cat $ssl_key_file $ssl_crt_file > $ssl_pem_file; chmod 600 $ssl_pem_file");
// Extend LE SSL certs to postfix
if ($conf['postfix']['installed'] == true && strtolower($this->simple_query('Symlink ISPConfig SSL certs to Postfix?', array('y', 'n'), 'y')) == 'y') {
if ($conf['postfix']['installed'] == true && strtolower($this->simple_query('Symlink ISPConfig SSL certs to Postfix?', array('y', 'n'), 'y','ispconfig_postfix_ssl_symlink')) == 'y') {
// Define folder, file(s)
$cf = $conf['postfix'];
......@@ -3062,7 +3065,7 @@ class installer_base {
}
// Extend LE SSL certs to pureftpd
if ($conf['pureftpd']['installed'] == true && strtolower($this->simple_query('Symlink ISPConfig SSL certs to Pure-FTPd? Creating dhparam file may take some time.', array('y', 'n'), 'y')) == 'y') {
if ($conf['pureftpd']['installed'] == true && strtolower($this->simple_query('Symlink ISPConfig SSL certs to Pure-FTPd? Creating dhparam file may take some time.', array('y', 'n'), 'y','ispconfig_pureftpd_ssl_symlink')) == 'y') {
// Define folder, file(s)
$pureftpd_dir = '/etc/ssl/private';
......
......@@ -49,5 +49,6 @@ smtp_tls_exclude_ciphers = RC4, aNULL
smtpd_tls_mandatory_ciphers = medium
tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
tls_preempt_cipherlist = no
address_verify_negative_refresh_time=60s
# needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
enable_original_recipient = yes
......@@ -45,5 +45,6 @@ smtp_tls_exclude_ciphers = RC4, aNULL
smtpd_tls_mandatory_ciphers = medium
tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
tls_preempt_cipherlist = no
address_verify_negative_refresh_time=60s
# needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
enable_original_recipient = yes
......@@ -44,5 +44,6 @@ smtp_tls_exclude_ciphers = RC4, aNULL
smtpd_tls_mandatory_ciphers = medium
tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
tls_preempt_cipherlist = no
address_verify_negative_refresh_time=60s
# needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
enable_original_recipient = yes
......@@ -47,5 +47,6 @@ smtp_tls_exclude_ciphers = RC4, aNULL
smtpd_tls_mandatory_ciphers = medium
tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
tls_preempt_cipherlist = no
address_verify_negative_refresh_time=60s
# needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
enable_original_recipient = yes
......@@ -548,7 +548,7 @@ if ($inst->install_ispconfig_interface) {
// Create SSL certs for non-webserver(s)?
if(!file_exists('/usr/local/ispconfig/interface/ssl/ispserver.crt')) {
if(!$issue_tried && strtolower($inst->simple_query('Do you want to create SSL certs for your server?', array('y', 'n'), 'y')) == 'y') {
if(!$issue_tried && strtolower($inst->simple_query('Do you want to create SSL certs for your server?', array('y', 'n'), 'y','create_ssl_server_certs')) == 'y') {
$inst->make_ispconfig_ssl_cert();
}
} else {
......
......@@ -176,7 +176,7 @@ var ISPConfig = {
ISPConfig.onAfterContentLoad(target, $('#'+formname).serialize());
ISPConfig.pageFormChanged = false;
}
clearTimeout(dataLogTimer);
clearTimeout(ISPConfig.dataLogTimer);
ISPConfig.dataLogNotification();
ISPConfig.hideLoadIndicator();
},
......@@ -285,7 +285,7 @@ var ISPConfig = {
ISPConfig.onAfterContentLoad(pagename, (params ? params : null));
ISPConfig.pageFormChanged = false;
}
clearTimeout(dataLogTimer); // clear running dataLogTimer
clearTimeout(ISPConfig.dataLogTimer); // clear running dataLogTimer
ISPConfig.dataLogNotification();
ISPConfig.hideLoadIndicator();
},
......@@ -514,12 +514,12 @@ var ISPConfig = {
$('.modal-body').html(dataLogItems.join(""));
$('.notification_text').text(data['count']);
$('.notification').css('display','');
dataLogTimer = setTimeout( function() { ISPConfig.dataLogNotification(); }, 2000 );
ISPConfig.dataLogTimer = setTimeout( function() { ISPConfig.dataLogNotification(); }, 2000 );
} else {
$('.notification').css('display','none');
$('.modal-body').html('');
$('#datalogModal').modal('hide');
dataLogTimer = setTimeout( function() { ISPConfig.dataLogNotification(); }, 5000 );
ISPConfig.dataLogTimer = setTimeout( function() { ISPConfig.dataLogNotification(); }, 5000 );
}
},
error: function() {
......
var ISPConfig={pageFormChanged:!1,tabChangeWarningTxt:"",tabChangeDiscardTxt:"",tabChangeWarning:!1,tabChangeDiscard:!1,requestsRunning:0,indicatorCompleted:!1,registeredHooks:new Array,new_tpl_add_id:0,dataLogTimer:0,options:{useLoadIndicator:!1,useComboBox:!1},setOption:function(a,b){ISPConfig.options[a]=b},setOptions:function(a){$.extend(ISPConfig.options,a)},reportError:function(){},registerHook:function(a,b){ISPConfig.registeredHooks[a]||(ISPConfig.registeredHooks[a]=new Array);var c=ISPConfig.registeredHooks[a].length;ISPConfig.registeredHooks[a][c]=b},callHook:function(a,b){if(ISPConfig.registeredHooks[a])for(var c=0;c<ISPConfig.registeredHooks[a].length;c++){var d=ISPConfig.registeredHooks[a][c];d(a,b)}},resetFormChanged:function(){ISPConfig.pageFormChanged=!1},showLoadIndicator:function(){if(document.body.style.cursor="wait",1==ISPConfig.options.useLoadIndicator&&(ISPConfig.requestsRunning+=1,ISPConfig.requestsRunning<2)){var a=$("#ajaxloader");a.length<1&&(a=$('<div id="ajaxloader" style="display: none;"></div>'),a.appendTo("body"));var b=$("#content");if(b.length<1)return;ISPConfig.indicatorCompleted=!1;var c=b.offset().left+150,d=b.offset().top+150;a.css({left:c,top:d}).fadeIn("fast",function(){ISPConfig.indicatorCompleted=!0,ISPConfig.requestsRunning<1&&$(this).fadeOut("fast",function(){$(this).hide()})})}},hideLoadIndicator:function(){document.body.style.cursor="",ISPConfig.requestsRunning-=1,ISPConfig.requestsRunning<1&&(ISPConfig.requestsRunning=0,1==ISPConfig.indicatorCompleted&&$("#ajaxloader").fadeOut("fast",function(){$("#ajaxloader").hide()}))},onAfterSideNavLoaded:function(){1==ISPConfig.options.useComboBox&&$("#sidebar").find("select:not(.chosen-select)").select2({placeholder:"",width:"element",selectOnBlur:!0,allowClear:!0})},onAfterContentLoad:function(a,b){b=b?"&"+b:"",1==ISPConfig.options.useComboBox&&$("#pageContent").find("select:not(.chosen-select)").select2({placeholder:"",width:"element",selectOnBlur:!0,allowClear:!0,formatResult:function(a){return a.id&&$(a.element).parent().hasClass("flags")?'<span class="flags flag-'+a.id.toLowerCase()+'">'+a.text+"</span>":a.text},formatSelection:function(a){return a.id&&$(a.element).parent().hasClass("flags")?'<span class="flags flag-'+a.id.toLowerCase()+'">'+a.text+"</span>":a.text}}).on("change",function(){$("#pageForm .table #Filter").length>0&&$("#pageForm .table #Filter").trigger("click")}),$('input[data-input-element="date"]').datetimepicker({language:"en",todayHighlight:!0,todayBtn:"linked",bootcssVer:3,fontAwesome:!0,autoclose:!0,minView:"month"}),$('input[data-input-element="datetime"]').datetimepicker({language:"en",todayHighlight:!0,todayBtn:"linked",bootcssVer:3,fontAwesome:!0,autoclose:!0}),$('[data-toggle="tooltip"]').tooltip({}),$('input[type="password"]').each(function(){$(this).prop("readonly",!0).tooltip({title:"Click to set",placement:"left"})}),$('input[type="password"]').on("click focus",function(){$(this).prop("readonly",!1),$(this).tooltip("destroy")}),ISPConfig.callHook("onAfterContentLoad",{url:a,data:b})},submitForm:function(a,b,c){var d=arguments[3];if(c||(c=!1),!c||window.confirm(c)){$.ajax({type:"POST",url:b,data:$("#"+a).serialize(),dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(c,e,f){if(d&&alert(d),f.responseText.indexOf("HEADER_REDIRECT:")>-1){var g=f.responseText.split(":");ISPConfig.loadContent(g[1])}else f.responseText.indexOf("LOGIN_REDIRECT:")>-1?document.location.href="./index.php":($("#pageContent").html(f.responseText),ISPConfig.onAfterContentLoad(b,$("#"+a).serialize()),ISPConfig.pageFormChanged=!1);clearTimeout(dataLogTimer),ISPConfig.dataLogNotification(),ISPConfig.hideLoadIndicator()},error:function(a){ISPConfig.hideLoadIndicator();a.responseText.split(":");ISPConfig.reportError("Ajax Request was not successful. 111")}})}},submitUploadForm:function(a,b){var c=function(a){var b,c=a.contentWindow.document.body.innerHTML;try{b=JSON.parse(c)}catch(d){b=c}var e=$("<div></div>").html(b),f="",g=e.find("#OKMsg").html();g&&(f='<div id="OKMsg">'+g+"</div>");var h=e.find("#errorMsg").html();h&&(f=f+'<div id="errorMsg">'+h+"</div>");var i=e.find('input[name="_csrf_key"]').val(),j=e.find('input[name="_csrf_id"]').val();return f=f+'<input type="hidden" name="_csrf_id" value="'+j+'" /><input type="hidden" name="_csrf_key" value="'+i+'" />'},d="ajaxUploader-iframe-"+Math.round((new Date).getTime()/1e3);$("body").append('<iframe width="0" height="0" style="display:none;" name="'+d+'" id="'+d+'"/>'),$("#"+d).load(function(){var a=c(this);$("#errorMsg").remove(),$("#OKMsg").remove(),$('input[name="_csrf_key"]').remove(),$('input[name="_csrf_id"]').remove(),$('input[name="id"]').before(a),$(this).remove()}),$('input[type="file"]').closest("form").attr({target:d,action:b}).submit()},capp:function(a,b){$.ajax({type:"GET",url:"capp.php",data:"mod="+a+(void 0!=b?"&redirect="+b:""),dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(a,b,c){if(""!=c.responseText)if(c.responseText.indexOf("HEADER_REDIRECT:")>-1){var d=c.responseText.split(":");ISPConfig.loadContent(d[1])}else if(c.responseText.indexOf("URL_REDIRECT:")>-1){var e=c.responseText.substr(c.responseText.indexOf("URL_REDIRECT:")+"URL_REDIRECT:".length);document.location.href=e}ISPConfig.loadMenus(),ISPConfig.hideLoadIndicator()},error:function(){ISPConfig.hideLoadIndicator(),ISPConfig.reportError("Ajax Request was not successful."+a)}})},loadContent:function(a){{var b=arguments[1];$.ajax({type:"GET",url:a,data:b?b:null,dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(c,d,e){if(e.responseText.indexOf("HEADER_REDIRECT:")>-1){var f=e.responseText.split(":");ISPConfig.loadContent(f[1])}else if(e.responseText.indexOf("URL_REDIRECT:")>-1){var g=e.responseText.substr(e.responseText.indexOf("URL_REDIRECT:")+"URL_REDIRECT:".length);document.location.href=g}else $("#pageContent").html(e.responseText),ISPConfig.onAfterContentLoad(a,b?b:null),ISPConfig.pageFormChanged=!1;clearTimeout(dataLogTimer),ISPConfig.dataLogNotification(),ISPConfig.hideLoadIndicator()},error:function(){ISPConfig.hideLoadIndicator(),ISPConfig.reportError("Ajax Request was not successful. 113")}})}},loadContentRefresh:function(a){if($("#refreshinterval").val()>0){{$.ajax({type:"GET",url:a,data:"refresh="+document.getElementById("refreshinterval").value,dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(b,c,d){ISPConfig.hideLoadIndicator(),$("#pageContent").html(d.responseText),ISPConfig.onAfterContentLoad(a,"refresh="+document.getElementById("refreshinterval").value),ISPConfig.pageFormChanged=!1},error:function(){ISPConfig.hideLoadIndicator(),ISPConfig.reportError("Ajax Request was not successful."+a)}})}setTimeout("ISPConfig.loadContentRefresh('"+a+"&refresh="+document.getElementById("refreshinterval").value+"')",1e3*document.getElementById("refreshinterval").value*60)}},loadInitContent:function(){var a=$("#pageContent").attr("data-startpage");a||(a="dashboard/dashboard.php");$.ajax({type:"GET",url:a,data:"",dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(a,b,c){if(c.responseText.indexOf("HEADER_REDIRECT:")>-1){var d=c.responseText.split(":");ISPConfig.loadContent(d[1])}else $("#pageContent").html(c.responseText),ISPConfig.onAfterContentLoad("dashboard/dashboard.php",""),ISPConfig.pageFormChanged=!1;ISPConfig.hideLoadIndicator()},error:function(){ISPConfig.hideLoadIndicator(),ISPConfig.reportError("Ajax Request was not successful. 114")}});ISPConfig.loadMenus(),ISPConfig.keepalive(),ISPConfig.dataLogNotification(),setTimeout(function(){try{$("form#pageForm").find('input[name="username"]').focus()}catch(a){}},1e3)},loadMenus:function(){$.ajax({type:"GET",url:"nav.php",data:"nav=side",dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(a,b,c){ISPConfig.hideLoadIndicator(),$("#sidebar").html(c.responseText),ISPConfig.onAfterSideNavLoaded(),ISPConfig.loadPushyMenu()},error:function(){ISPConfig.hideLoadIndicator(),ISPConfig.reportError("Ajax Request was not successful. 115")}}),$.ajax({type:"GET",url:"nav.php",data:"nav=top",dataType:"html",beforeSend:function(){ISPConfig.showLoadIndicator()},success:function(a,b,c){ISPConfig.hideLoadIndicator(),$("#topnav-container").html(c.responseText),ISPConfig.loadPushyMenu()},error:function(){ISPConfig.hideLoadIndicator(),ISPConfig.reportError("Ajax Request was not successful. 116")}})},changeTab:function(a,b,c){if(ISPConfig.requestsRunning>0)return console.log("tab change interrupted, request still running."),!1;document.pageForm.next_tab.value=a;var d=$("form#pageForm").find('[name="id"]'),e=null;if(d.length>0&&(e=d.val()),"y"!=ISPConfig.tabChangeDiscard||c)if(e&&"y"==ISPConfig.tabChangeWarning&&1==ISPConfig.pageFormChanged)if(window.confirm(ISPConfig.tabChangeWarningTxt))ISPConfig.submitForm("pageForm",b);else{var f=a;e?ISPConfig.loadContent(b,{next_tab:f,id:e}):ISPConfig.loadContent(b,{next_tab:f})}else ISPConfig.submitForm("pageForm",b);else{if(!(d.length<1||e)||0!=ISPConfig.pageFormChanged&&!window.confirm(ISPConfig.tabChangeDiscardTxt))return!1;var f=a;e?ISPConfig.loadContent(b,{next_tab:f,id:e}):ISPConfig.loadContent(b,{next_tab:f})}},confirm_action:function(a,b){window.confirm(b)&&ISPConfig.loadContent(a)},loadContentInto:function(a,b){$.ajax({type:"GET",url:b,dataType:"html",beforeSend:function(){},success:function(b,c,d){$("#"+a).html(d.responseText)},error:function(){ISPConfig.reportError("Ajax Request was not successful. 118")}})},loadOptionInto:function(a,b,c){$.ajax({type:"GET",url:b,dataType:"html",beforeSend:function(){},success:function(d,e,f){var g=f.responseText,h=g.split("#");el=document.getElementById(a),el.innerHTML="";for(var i=0;i<h.length;++i){var j=document.createElement("option");j.appendChild(document.createTextNode(h[i])),j.value=h[i],el.appendChild(j)}"undefined"!=typeof c&&c(a,b)},error:function(){ISPConfig.reportError("Ajax Request was not successful. 119")}})},keepalive:function(){$.ajax({type:"GET",url:"keepalive.php",dataType:"html",success:function(){setTimeout(function(){ISPConfig.keepalive()},1e6)},error:function(){ISPConfig.reportError("Session expired. Please login again.")}})},dataLogNotification:function(){console.log(ISPConfig.options);$.ajax({type:"GET",url:"datalogstatus.php",dataType:"json",success:function(a){var d=[];$.each(a.entries,function(a,b){d.push("<li><strong>"+b.text+":</strong> "+b.count+"</li>")}),a.count>0?($(".modal-body").html(d.join("")),$(".notification_text").text(a.count),$(".notification").css("display",""),dataLogTimer=setTimeout(function(){ISPConfig.dataLogNotification()},2e3)):($(".notification").css("display","none"),$(".modal-body").html(""),$("#datalogModal").modal("hide"),dataLogTimer=setTimeout(function(){ISPConfig.dataLogNotification()},5e3))},error:function(){ISPConfig.reportError("Notification not loading, aborting."),$(".notification").css("display","none")}})},addAdditionalTemplate:function(){var a=$("#template_additional").val(),b=$("#tpl_add_select").val().split("|",2),c=b[0],d=b[1];if(c>0){var e=a.split("/");ISPConfig.new_tpl_add_id+=1;var f=$('<a href="#"><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></span></a>').attr("class","btn btn-danger btn-xs").click(function(a){a.preventDefault(),ISPConfig.delAdditionalTemplate($(this).parent().attr("rel"))});e[e.length]="n"+ISPConfig.new_tpl_add_id+":"+c,$("<li>"+d+"</li>").attr("rel","n"+ISPConfig.new_tpl_add_id).append(f).appendTo("#template_additional_list ul"),$("#template_additional").val(e.join("/")),alert("additional template "+d+" added to customer")}else alert("no additional template selcted")},delAdditionalTemplate:function(a){var b=$("#template_additional").val();if(a){var c=$("#template_additional_list ul").find('li[rel="'+a+'"]').eq(0),d=c.text();c.remove();for(var e=b.split("/"),f=new Array,g=0;g<e.length;g++){var h=e[g].split(":",2);(2!=h.length||h[0]!=a)&&(f[f.length]=e[g])}$("#template_additional").val(f.join("/")),alert("additional template "+d+" deleted from customer")}else if(""!=b){var i=document.getElementById("tpl_add_select").value.split("|",2),j=i[0],d=i[1];$("#template_additional_list ul").find("li:not([rel])").each(function(){var a=$(this).text();return a==d?($(this).remove(),!1):this});var f=b,k=new RegExp("(^|/)"+j+"(/|$)");f=f.replace(k,""),f=f.replace("//","/"),$("#template_additional").val(f),alert("additional template "+d+" deleted from customer")}else alert("no additional template selcted")}};$(document).on("change",function(a){var b=a.target.localName;$("#pageForm .table #Filter").length>0&&"select"==b&&(a.preventDefault(),$("#pageForm .table #Filter").trigger("click")),("select"==b||"input"==b||"textarea"==b)&&0==$(a.target).hasClass("no-page-form-change")&&(ISPConfig.pageFormChanged=!0)});var $page=$("html, body");$(document).on("click","a[data-load-content],button[data-load-content]",function(a){if(a.preventDefault(),ISPConfig.requestsRunning>0)return void console.log("preventing click because there is still a request running.");$page.on("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove",function(){$page.stop()}),$page.animate({scrollTop:0},1e3,function(){$page.off("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove",function(){$page.stop()})});var b=$(this).attr("data-load-content");return b?void ISPConfig.loadContent(b):this}),$(document).on("click","a[data-capp],button[data-capp]",function(a){if(a.preventDefault(),ISPConfig.requestsRunning>0)return void console.log("preventing click because there is still a request running.");$page.on("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove",function(){$page.stop()}),$page.animate({scrollTop:0},1e3,function(){$page.off("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove",function(){$page.stop()})});var b=$(this).attr("data-capp");return b?void ISPConfig.capp(b):this}),$(document).on("click","a[data-submit-form],button[data-submit-form]",function(a){if(a.preventDefault(),ISPConfig.requestsRunning>0)return void console.log("preventing click because there is still a request running.");$page.on("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove",function(){$page.stop()}),$page.animate({scrollTop:0},1e3,function(){$page.off("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove",function(){$page.stop()})});var b=$(this),c=b.attr("data-form-action"),d=b.attr("data-submit-form");"true"==b.attr("data-form-upload")?ISPConfig.submitUploadForm(d,c):ISPConfig.submitForm(d,c)}),$(document).bind("keypress",function(a){"13"==a.which&&$("#pageForm .table #Filter").length>0&&0==$(a.target).hasClass("ui-autocomplete-input")&&(a.preventDefault(),$("#pageForm .table #Filter").trigger("click")),"13"==a.which&&$(".tab-content button.formbutton-success").length>0&&"textarea"!=a.target.localName&&$(a.target).is(":input")&&(a.preventDefault(),$(".tab-content button.formbutton-success").not("[disabled='disabled']").trigger("click"))}),$(document).on("click","th[data-column]",function(){var b=$(this),c=b.attr("data-column");if(!c)return this;if($("#pageForm .table #Filter").length>0&&"false"!=b.attr("data-sortable")){var d=$("#Filter"),e=d.attr("data-form-action"),f=d.attr("data-submit-form"),g=b.attr("data-ordered"),h="?";e.indexOf("?")>=0&&(h="&"),e=e+h+"orderby="+c,ISPConfig.submitForm(f,e),$(document).ajaxComplete(function(){var a=$('#pageForm .table th[data-column="'+c+'"]');a.parent().children("th[data-column]").removeAttr("data-ordered"),g&&"asc"==g?a.attr("data-ordered","desc"):a.attr("data-ordered","asc")})}}),$(document).on("click",".addPlaceholder",function(){var a=$(this).text(),b=$(this).siblings(":input");b.insertAtCaret(a)}),$(document).on("click",".addPlaceholderContent",function(){var a=$(this).find(".addPlaceholderContent").text(),b=$(this).siblings(":input");b.insertAtCaret(a)}),$(document).on("click","[data-check-fields] > input[type='checkbox']",function(){if($(this).is(":checked"))for(var a=$(this).parent().attr("data-check-fields"),b=a.split(/,/),c=0;c<b.length;c++){var d=b[c];$('input[type="checkbox"][name="'+d+'"]').prop("checked",!0)}}),$(document).on("click","[data-uncheck-fields] > input[type='checkbox']",function(){if(0==$(this).is(":checked"))for(var a=$(this).parent().attr("data-uncheck-fields"),b=a.split(/,/),c=0;c<b.length;c++){var d=b[c];$('input[type="checkbox"][name="'+d+'"]').prop("checked",!1)}}),$(document).on("ready",function(){$.fn.extend({insertAtCaret:function(a){return this.each(function(){if(document.selection)this.focus(),sel=document.selection.createRange(),sel.text=a,this.focus();else if(this.selectionStart||"0"==this.selectionStart){var c=this.selectionStart,d=this.selectionEnd,e=this.scrollTop;this.value=this.value.substring(0,c)+a+this.value.substring(d,this.value.length),this.focus(),this.selectionStart=c+a.length,this.selectionEnd=c+a.length,this.scrollTop=e}else this.value+=a,this.focus()})}}),$(".progress .progress-bar").css("width",function(){return $(this).attr("aria-valuenow")+"%"}),ISPConfig.loadInitContent(),$("#searchform").submit(function(a){a.preventDefault()}),$("#pageForm").submit(function(a){$("#pageForm .table #Filter").length>0&&a.preventDefault()}),$.fn.setCursorPosition=function(a){var b=$(this).get(0);if(b.setSelectionRange)b.setSelectionRange(a,a);else if(b.createTextRange){var c=b.createTextRange();c.collapse(!0),a<0&&(a=$(this).val().length+a),c.moveEnd("character",a),c.moveStart("character",a),c.select()}},$.fn.getCursorPosition=function(){var a=0,b=$(this).get(0);if("number"===typeof b.selectionStart)a="backward"==b.selectionDirection?b.selectionStart:b.selectionEnd;else if(document.selection){this.focus();var c=document.selection.createRange();c.moveStart("character",-b.value.length),a=c.text.length}return a}});
\ No newline at end of file
......@@ -17,7 +17,7 @@ if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes",
<tmpl_if name="cc">
# Send a copy of email to
<tmpl_loop name="ccloop">
redirect "<tmpl_var name='address'>";
redirect :copy "<tmpl_var name='address'>";
</tmpl_loop>
</tmpl_if>
......
......@@ -326,7 +326,7 @@ class postfix_server_plugin {
}
$new_options[] = $value;
}
if (defined($configure_lmtp) && $configure_lmtp) {
if (defined($configure_lmtp) && $configure_lmtp && $mail_config['content_filter'] == 'amavisd') {
for ($i = 0; isset($new_options[$i]); $i++) {
if ($new_options[$i] == 'reject_unlisted_recipient') {
array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:${quoted_postfix_config_dir}/mysql-verify_recipients.cf"));
......
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