Skip to content

Commit 412207a

Browse files
author
Till Brehm
committed
Merge branch '6389-mail-filter-not-configured-correctly' into 'develop'
Fixed issue #6389 mail server not configured correctly Closes #6389 See merge request ispconfig/ispconfig3!1637
2 parents f72c382 + bb9295d commit 412207a

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ build:package:
9090
- if [[ "$VER" == "" ]] ; then VER="3.2dev"$(date +%s) ; fi
9191
- if [[ "$VER" != "" ]] ; then echo "Replacing 3.2dev by $VER" ; sed -i -r 's/3\.2dev/'${VER}'/g' install/tpl/config.inc.php.master install/sql/ispconfig3.sql ; fi
9292
- RET=0
93-
- tar -cpzf ISPConfig-${VER}.tar.gz --exclude "ISPConfig-${VER}.tar.gz" --exclude ".git*" --exclude ".phplint.yml" --transform 's,^\./,ispconfig3_install/,' . || RET=$?
93+
- tar -cpzf ISPConfig-${VER}.tar.gz --exclude "ISPConfig-${VER}.tar.gz" --exclude ".git*" --exclude ".phplint.yml" --transform 's,^\./,ispconfig3_install/,' --mode='0775' ./* || RET=$?
9494
- if [[ $RET > 1 ]] ; then exit $RET ; fi
9595
- echo "Listing tar contents for verification"
9696
- tar -tvf ISPConfig-${VER}.tar.gz
@@ -101,4 +101,4 @@ build:package:
101101
- echo "Download url is https://download.ispconfig.org/ISPConfig-${VER}.tar.gz"
102102

103103
needs: ["syntax:lint"]
104-
allow_failure: false
104+
allow_failure: false

install/lib/installer_base.lib.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,7 +1653,7 @@ public function configure_amavis() {
16531653
//* These postconf commands will be executed on installation and update
16541654
$server_ini_rec = $this->db->queryOneRecord("SELECT mail_server, config FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']);
16551655
$server_ini_array = ini_to_array(stripslashes($server_ini_rec['config']));
1656-
$mail_server = ($server_ini_rec['mail_server']) ? true : false;
1656+
$mail_server = $conf['services']['mail'];
16571657
unset($server_ini_rec);
16581658

16591659
// amavisd user config file
@@ -1777,7 +1777,7 @@ public function configure_rspamd() {
17771777
//* These postconf commands will be executed on installation and update
17781778
$server_ini_rec = $this->db->queryOneRecord("SELECT mail_server, config FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']);
17791779
$server_ini_array = ini_to_array(stripslashes($server_ini_rec['config']));
1780-
$mail_server = ($server_ini_rec['mail_server']) ? true : false;
1780+
$mail_server = $conf['services']['mail'];
17811781
unset($server_ini_rec);
17821782

17831783
$config_dir = $conf['postfix']['config_dir'];
@@ -1981,8 +1981,13 @@ public function configure_rspamd() {
19811981

19821982
exec('chmod a+r /etc/rspamd/local.d/* /etc/rspamd/local.d/maps.d/* /etc/rspamd/override.d/*');
19831983
# protect passwords in these files
1984-
exec('chgrp _rspamd /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf /etc/rspamd/local.d/worker-controller.inc');
1985-
exec('chmod 640 /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf /etc/rspamd/local.d/worker-controller.inc');
1984+
exec('chgrp _rspamd /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf');
1985+
exec('chmod 640 /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf');
1986+
1987+
if(file_exists('/etc/rspamd/local.d/worker-controller.inc')) {
1988+
exec('chgrp _rspamd /etc/rspamd/local.d/worker-controller.inc');
1989+
exec('chmod 640 /etc/rspamd/local.d/worker-controller.inc');
1990+
}
19861991

19871992
# unneccesary, since this was done above?
19881993
$command = 'usermod -a -G amavis _rspamd';

0 commit comments

Comments
 (0)