From 3e8e99d68ac621d8b028d18bbe700ee68f427d10 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Sun, 7 Jul 2024 15:16:33 +0200
Subject: [PATCH] Cleanup comment we generated, #6729

---
 install/lib/installer_base.lib.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 6b72bbf834..98ebc60446 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1070,6 +1070,7 @@ class installer_base extends stdClass {
 
 			# reduce 3 or more newlines to 2
 			$content = rf($conf['postfix']['config_dir'].'/master.cf');
+			$content = preg_replace( '/^# Data returning from Amavis .*$/m', '', $content );  # Cleanup comment we generated
 			$content = preg_replace( '/(\r?\n){3,}/', '$1$1', $content );
 			wf( $conf['postfix']['config_dir'].'/master.cf', $content );
 
-- 
GitLab