Skip to content

Commit 49441bd

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents b631194 + da3c0c4 commit 49441bd

File tree

107 files changed

+661
-736
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+661
-736
lines changed

install/dist/lib/centos72.lib.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
/*
4+
Copyright (c) 2014, Till Brehm, ISPConfig UG
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
* Neither the name of ISPConfig nor the names of its contributors
16+
may be used to endorse or promote products derived from this software without
17+
specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
31+
require_once realpath(dirname(__FILE__)) . '/centos_base.lib.php';
32+
33+
class installer extends installer_centos {
34+
35+
protected $clamav_socket = '/var/run/clamd.amavisd/clamd.sock';
36+
37+
// everything else is inherited from installer_centos class
38+
}
39+
40+
?>

install/dist/lib/centos_base.lib.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class installer_centos extends installer_dist {
3333
protected $clamav_socket = '/tmp/clamd.socket';
3434

3535
public function configure_amavis() {
36-
global $conf;
36+
global $conf, $dist;
3737

3838
// amavisd user config file
3939
$configfile = 'fedora_amavisd_conf';
@@ -50,6 +50,12 @@ public function configure_amavis() {
5050
$content = str_replace('/var/spool/amavisd/clamd.sock', $this->clamav_socket, $content);
5151
wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
5252
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
53+
54+
// for CentOS 7.2 only
55+
if($dist['confid'] == 'centos72') {
56+
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0750);
57+
chgrp($conf['amavis']['config_dir'].'/amavisd.conf', 'amavis');
58+
}
5359

5460

5561
// Adding the amavisd commands to the postfix configuration

install/dist/lib/fedora.lib.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ function configure_postfix($options = '')
8989

9090
//* mysql-virtual_relayrecipientmaps.cf
9191
$this->process_postfix_config('mysql-virtual_relayrecipientmaps.cf');
92+
93+
//* mysql-virtual_outgoing_bcc.cf
94+
$this->process_postfix_config('mysql-virtual_outgoing_bcc.cf');
9295

9396
//* mysql-virtual_policy_greylist.cf
9497
$this->process_postfix_config('mysql-virtual_policy_greylist.cf');
@@ -179,6 +182,7 @@ function configure_postfix($options = '')
179182
//if(!is_file('/var/lib/mailman/data/aliases')) touch('/var/lib/mailman/data/aliases');
180183
if(is_file('/var/lib/mailman/data/aliases')) unlink('/var/lib/mailman/data/aliases');
181184
if(!is_link('/var/lib/mailman/data/aliases')) symlink('/etc/mailman/aliases', '/var/lib/mailman/data/aliases');
185+
if(!is_file('/etc/mailman/aliases')) touch('/etc/mailman/aliases');
182186
exec('postalias /var/lib/mailman/data/aliases');
183187
if(!is_file('/etc/mailman/virtual-mailman')) touch('/etc/mailman/virtual-mailman');
184188
exec('postmap /etc/mailman/virtual-mailman');
@@ -476,7 +480,7 @@ public function configure_dovecot()
476480
}
477481

478482
public function configure_amavis() {
479-
global $conf;
483+
global $conf, $dist;
480484

481485
// amavisd user config file
482486
$configfile = 'fedora_amavisd_conf';
@@ -491,6 +495,12 @@ public function configure_amavis() {
491495
$content = str_replace('{hostname}', $conf['hostname'], $content);
492496
wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
493497
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
498+
499+
// for CentOS 7.2 only
500+
if($dist['confid'] == 'centos72') {
501+
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0750);
502+
chgrp($conf['amavis']['config_dir'].'/amavisd.conf', 'amavis');
503+
}
494504

495505

496506
// Adding the amavisd commands to the postfix configuration

0 commit comments

Comments
 (0)