From 80997df294aef3b6d9a8226c0b83409e5ae672fa Mon Sep 17 00:00:00 2001
From: xaver <xaver@ispconfig3>
Date: Thu, 15 Sep 2011 19:12:55 -0400
Subject: [PATCH] language select by export same size and flags function now
---
install/lib/installer_base.lib.php | 34 +++++++++++++++++++++++-----------
1 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index c7ec0ca..08e4649 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -554,7 +554,7 @@
$virtual_domains = "' '";
$content = str_replace('{hostname}', $conf['hostname'], $content);
- if(!isset($old_options['DEFAULT_SERVER_LANGUAGE'])) $old_options['DEFAULT_SERVER_LANGUAGE'] = ''
+ if(!isset($old_options['DEFAULT_SERVER_LANGUAGE'])) $old_options['DEFAULT_SERVER_LANGUAGE'] = '';
$content = str_replace('{default_language}', $old_options['DEFAULT_SERVER_LANGUAGE'], $content);
$content = str_replace('{virtual_domains}', $virtual_domains, $content);
@@ -640,6 +640,7 @@
'proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps',
'smtpd_sender_restrictions = check_sender_access mysql:'.$config_dir.'/mysql-virtual_sender.cf',
'smtpd_client_restrictions = check_client_access mysql:'.$config_dir.'/mysql-virtual_client.cf',
+ 'smtpd_client_message_rate_limit = 100',
'maildrop_destination_concurrency_limit = 1',
'maildrop_destination_recipient_limit = 1',
'virtual_transport = maildrop',
@@ -716,10 +717,10 @@
}
//* Chmod and chown the .mailfilter file
- $command = 'chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base'].'/.mailfilter';
+ $command = 'chown '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base'].'/.mailfilter';
caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
- $command = 'chmod -R 600 '.$cf['vmail_mailbox_base'].'/.mailfilter';
+ $command = 'chmod 600 '.$cf['vmail_mailbox_base'].'/.mailfilter';
caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
@@ -908,10 +909,19 @@
// Adding the amavisd commands to the postfix configuration
- $postconf_commands = array (
- 'content_filter = amavis:[127.0.0.1]:10024',
- 'receive_override_options = no_address_mappings'
- );
+ // Add array for no error in foreach and maybe future options
+ $postconf_commands = array ();
+
+ // Check for amavisd -> pure webserver with postfix for mailing without antispam
+ // Check for different names
+ system('which amavisd-new', $retval); // Debian, Ubuntu, ?
+ if ($retval !== 0){
+ system('which amavisd', $retval); // CentOS
+ }
+ if ($retval === 0) {
+ $postconf_commands[] = 'content_filter = amavis:[127.0.0.1]:10024';
+ $postconf_commands[] = 'receive_override_options = no_address_mappings';
+ }
// Make a backup copy of the main.cf file
copy($conf['postfix']['config_dir'].'/main.cf',$conf['postfix']['config_dir'].'/main.cf~2');
@@ -1679,10 +1689,12 @@
if(!is_dir($conf['ispconfig_log_dir'])) mkdir($conf['ispconfig_log_dir'], 0755);
touch($conf['ispconfig_log_dir'].'/ispconfig.log');
}
-
- rename($install_dir.'/server/scripts/run-getmail.sh','/usr/local/bin/run-getmail.sh');
- if(is_user('getmail')) chown('/usr/local/bin/run-getmail.sh', 'getmail');
- chmod('/usr/local/bin/run-getmail.sh', 0744);
+
+ if(is_user('getmail')) {
+ rename($install_dir.'/server/scripts/run-getmail.sh','/usr/local/bin/run-getmail.sh');
+ if(is_user('getmail')) chown('/usr/local/bin/run-getmail.sh', 'getmail');
+ chmod('/usr/local/bin/run-getmail.sh', 0744);
+ }
//* Add Log-Rotation
if (is_dir('/etc/logrotate.d')) {
--
Gitblit v1.9.1