From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id A29561FF146 for ; Tue, 09 Jun 2026 12:08:20 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 85016BD43; Tue, 9 Jun 2026 12:08:20 +0200 (CEST) From: Stoiko Ivanov To: pmg-devel@lists.proxmox.com Subject: [PATCH pmg-api 1/2] d/postinst: ensure that clamav-daemon is enabled Date: Tue, 9 Jun 2026 12:07:55 +0200 Message-ID: <20260609100805.1631021-2-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260609100805.1631021-1-s.ivanov@proxmox.com> References: <20260609100805.1631021-1-s.ivanov@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1780999650917 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.085 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: C4EROVE7CYMQGLTHXXFZW6QXDRJFIV6W X-Message-ID-Hash: C4EROVE7CYMQGLTHXXFZW6QXDRJFIV6W X-MailFrom: s.ivanov@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Similar to: cb8e149 ("d/postinst: ensure that clamav-freshclam is enabled") We recently packaged the version currently in debian testing, which explicitly installs clamav-daemon, without enabling it, while debian-upstream's experimental branch does enable it. As there is quite a bit of back and forth - simply enable the service unconditionally. We might look into making it possible to keep clamav disabled (e.g. if users are relying on avast only, or have a custom_check_script which handles virus checking) - but that can be done independently. Signed-off-by: Stoiko Ivanov --- debian/postinst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debian/postinst b/debian/postinst index c7e05e7..ee218ab 100644 --- a/debian/postinst +++ b/debian/postinst @@ -145,6 +145,11 @@ case "$1" in deb-systemd-invoke enable clamav-freshclam.service >/dev/null 2>&1 || true fi + if ! systemctl --quiet is-enabled clamav-daemon.service ; then + echo "Enabling clamav-daemon as antivirus" + deb-systemd-invoke enable clamav-daemon.service >/dev/null 2>&1 || true + fi + if test -n "$2" && dpkg --compare-versions "$2" 'lt' '8.2.0'; then old_score_location=/var/cache/pmg-scores.cf new_score_location=/etc/mail/spamassassin/pmg-scores.cf.new -- 2.47.3