SA Bugzilla – Bug 7667
division by zero possible in latest update
Last modified: 2018-12-10 22:39:27 UTC
CentOS 5, the latest update cannot be installed: /etc/cron.daily/sa_update: config: invalid expression for rule T_MIXED_ES: "( __LOWER_E > 20 ) && ( __E_LIKE_LETTER > ( (__LOWER_E * 14 ) / 10) ) && ( ( __E_LIKE_LETTER / __LOWER_E ) < 10 )": division by zero possible I assume it is because of __E_LIKE_LETTER / __LOWER_E. Is it possible to rewrite it, or is the perl version too old in CentOS 5?
We don't have a deep analysis of this bug, but it has only been reported with obsolete unsupported versions of SpamAssassin (3.3.x) which would be consistent with CentOS 5.x or any other EL5-family distribution. The specific error message is generated by SpamAssassin, not Perl itself. The relevant code (in Mail::SpamAssassin::Conf::Parser) has undergone extensive revision between 3.3.2 and 3.4.2.. You may be able to upgrade SA to v3.4.2 using CPAN, because in principle SA v3.4.2 supports Perl v5.8.1 or newer. If you do so and still encounter this issue, please reopen this bug.
What version of spamassassin is on the system? We can at least add a version conditional to the rule. Regards, KAM
Version 3.3.2 (spamassassin-3.3.2-56.el5). But the interesting thing is, that on CentOS 6 I have spamassassin-3.3.1-3.el6, and update worked there, there is T_MIXED_ES rule in /var/lib/spamassassin/3.003001/72_active.cf. I will try to build 3.4.2.
Why not just rewrite it as ... && (__E_LIKE_LETTER < 10*__LOWER_E ) and have done with it.
(In reply to RW from comment #4) > Why not just rewrite it as > > ... && (__E_LIKE_LETTER < 10*__LOWER_E ) > > and have done with it. Good idea. Done.
I built and installed 3.4.2, but still get the same error on CentOS 5: # sa-update config: invalid expression for rule T_MIXED_ES: "( __LOWER_E > 20 ) && ( __E_LIKE_LETTER > ( (__LOWER_E * 14 ) / 10) ) && ( ( __E_LIKE_LETTER / __LOWER_E ) < 10 )": division by zero possible