From 2c2fa72c41fd31d986d205c14e90a60d96868656 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Tue, 21 Sep 2021 13:29:19 -0600
Subject: [PATCH] installer:  missing variable assigments

---
 install/lib/installer_base.lib.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 5e7a14a5cd..b788fd7c63 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1666,6 +1666,9 @@ class installer_base {
 		wf($conf['amavis']['config_dir'].'/conf.d/50-user', $content);
 		chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640);
 
+		$config_dir = $conf['postfix']['config_dir'];
+		$quoted_config_dir = preg_quote($config_dir, '|');
+
 		$mail_config = $server_ini_array['mail'];
 		//* only change postfix config if amavisd is active filter
 		if($mail_server && $mail_config['content_filter'] === 'amavisd') {
@@ -1717,8 +1720,6 @@ class installer_base {
 				caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 			}
 
-			$config_dir = $conf['postfix']['config_dir'];
-
 			// Adding amavis-services to the master.cf file if the service does not already exists
 			// (just remove the old service definitions and add them again)
 			$add_amavis = $this->remove_postfix_service('amavis','unix');
@@ -1779,6 +1780,9 @@ class installer_base {
 		$mail_server = ($server_ini_rec['mail_server']) ? true : false;
 		unset($server_ini_rec);
 
+		$config_dir = $conf['postfix']['config_dir'];
+		$quoted_config_dir = preg_quote($config_dir, '|');
+
 		$mail_config = $server_ini_array['mail'];
 		//* only change postfix config if rspamd is active filter
 		if($mail_server && $mail_config['content_filter'] === 'rspamd') {
-- 
GitLab