From fc6f0ae0ce38734aab61dd90f36e281f71368cbc Mon Sep 17 00:00:00 2001 From: uwallrodt <53134299+uwallrodt@users.noreply.github.com> Date: Mon, 14 Sep 2026 10:55:50 +1000 Subject: [PATCH] Fix Exim version detection for versions >= 4.100 Perl's `>=` numeric comparison numifies "4.100" to 4.1, which is less than 4.97, so MailScanner wrongly assumes Exim is old and disables eximlongids. This breaks the split-spool message ID layout on any Exim >= 4.100 (e.g. after a cPanel/EA4 upgrade), leaving messages misfiled and stuck/undeletable in the queue. This replaces the naive numeric compare with a proper major.minor split comparison. Fixes #717. Credit: diagnosis and fix approach originally posted by community member nickgr on cPanel's support forum (https://support.cpanel.net/hc/en-us/community/posts/43412185290519), confirmed independently reproduced and fixed in production. --- common/usr/sbin/MailScanner | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/usr/sbin/MailScanner b/common/usr/sbin/MailScanner index fa6e3d5f..4f4f2ab3 100644 --- a/common/usr/sbin/MailScanner +++ b/common/usr/sbin/MailScanner @@ -399,7 +399,8 @@ if (/exim/i) { print STDERR "Unable to obtain version of Exim. Please check the path to Exim Command in MailScanner.conf"; exit 1; } - if ($ver >= 4.97) { + my ($vmaj, $vmin) = $ver =~ /^(\d+)\.(\d+)/; + if (defined $vmaj && ($vmaj > 4 || ($vmaj == 4 && $vmin >= 97))) { MailScanner::Config::SetValue('eximlongids',1); } else { MailScanner::Config::SetValue('eximlongids',0);