Unescaped left brace in regex is deprecated sa-learn error
Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/(?is)spam title here claim.{1,10}your.gbp|won.you.{ <-- HERE 1,10]gbp)/ at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib/Mail/SpamAssassin/Conf/Parser.pm line 1403.(Note the curly bracket followed by a square bracket syntax error): "won.you.{1,10]gbp" I don't have WHM access on this server, but I've checked the /etc/mail/spamassassin/KAM.cf file, and the syntax there is also incorrect:
find / -iname kam.cf
/etc/mail/spamassassin/KAM.cfgrep "1,10]gbp" /etc/mail/spamassassin/KAM.cf
body __KAM_LOTTO5 /spam title here claim.{1,10}your.gbp|won.you.{1,10]gbp)/isI've spoken with the support team for this particular server, but they seem nonplussed by this problem. How do I explain how to update this KAM.cf to a version without this syntax error? Thanks. Edit: Yes, I do mean "/etc/mail/spamassassin/KAM.cf" (not /usr/local/cpanel/etc/mail/spamassassin/KAM.cf)
-
Actually, I think that this is the key: I do mean "/etc/mail/spamassassin/KAM.cf" (not /usr/local/cpanel/etc/mail/spamassassin/KAM.cf) I did 'ls -la /etc/mail/spamassassin' and got this: total 364 drwxr-xr-x. 3 root root 4096 Oct 4 04:09 . drwxr-xr-x. 3 root root 4096 May 9 2014 .. -rw-r--r-- 1 root root 748 Dec 4 2015 BAYES_POISON_DEFENSE.cf -rw-r--r-- 1 root root 4231 Aug 30 2016 CPANEL.cf -rw-r--r-- 1 root root 22964 Sep 24 2018 deadweight.cf -rw-r--r-- 1 root root 1289 Feb 8 2019 init.pre -rw-r--r-- 1 root root 285164 Dec 4 2015 KAM.cf -rw-r--r-- 1 root root 1349 Mar 18 2019 kam_heavyweights.cf -rwx------ 1 root root 348 Feb 8 2019 kill-spamd.sh -rw-r--r--. 1 root root 2824 May 4 2017 local.cf -rw-r--r-- 1 root root 3504 Dec 4 2015 P0f.cf drwx------. 2 root root 4096 Oct 3 04:37 sa-update-keys lrwxrwxrwx 1 root root 59 May 9 2018 user_prefs.template -> /usr/local/cpanel/etc/mail/spamassassin/user_prefs.template -rw-r--r-- 1 root root 2524 Feb 8 2019 v310.pre -rw-r--r-- 1 root root 1194 Feb 8 2019 v312.pre -rw-r--r--. 1 root root 2412 Feb 12 2017 v320.pre -rw-r--r-- 1 root root 1237 Feb 8 2019 v330.pre
Note there's only 1 file that is a link, and the KAM.cf dates from 2015. I believe every entry except init.pre, kill-spamd.sh, local.cf, sa-update-keys and the four *.pre files should be linked to /usr/local/cpanel/etc/mail/spamassassin/... So now the question is: how can this directory be corrected? I thought it might be checked during the cpanel update?0 -
Lots of views, but no suggestions as to how this directory became corrupted, or how to put it right? (Thanks to the moderators for changing the title of this thread, I actually thought that the original subject referencing KAM.cf directly was more apt though, in this case) 0 -
Hi @km9 There should definitely be symlinks there - and there should be updated information. The cPanel update would normally encompass this. Can you show me the output of the following cat /etc/cpanelsync.exclude
cat /etc/cpupdate.conf0 -
Hi, thanks for the interest, but I don't have root access to this machine, and I persuaded the support team to reinstate the links manually: ln -sf /usr/local/cpanel/etc/mail/spamassassin/BAYES_POISON_DEFENSE.cf /etc/mail/spamassassin/ ln -sf /usr/local/cpanel/etc/mail/spamassassin/CPANEL.cf /etc/mail/spamassassin/ ln -sf /usr/local/cpanel/etc/mail/spamassassin/KAM.cf /etc/mail/spamassassin/ ln -sf /usr/local/cpanel/etc/mail/spamassassin/P0f.cf /etc/mail/spamassassin/
Which solved the problem. Neither of those files exist though: (cat: /etc/cpanelsync.exclude: No such file or directory, cat: /etc/cpanelsync.exclude: No such file or directory)0 -
Hello.
Why this bug was not fixed in latest version of cPanel?
Solution:/etc/mail/spamassassin/KAM.cf
replace from (released: 2015)
body __KAM_LOTTO5 /(POWERBALL LOTTO|freelotto group|Royal Heritage Lottery|(British|UK) National( Online)? Lottery|U\.?K\.? Grand Promotions|Lottery Department UK|Euromillion Loteria|Luckyday International Lottery|International Lottery|Euro - Afro Asian Sweepstake|urawinner|Free Lotto Sweepstakes|PROMOTION DEPARTMENT|PROMOTION\/PRIZE AWARD|Nederlandse Internationale Loterij|EURO MILLIONS|APPLE LOTTERY ONLINE|MSW MEGA JACKPOT|MICROSOFT EMAIL PROMO|MSNlottery|ECOWAS|Nigeria|National Lottery|claim.{1,10}your.gbp|won.you.{1,10]gbp)/isreplace to (released: 2017)
body __KAM_LOTTO5 /(POWERBALL LOTTO|freelotto group|Royal Heritage Lottery|(British|UK) National( Online)? Lottery|U\.?K\.? Grand Promotions|Lottery Department UK|Euromillion Loteria|Luckyday International Lottery|International Lottery|Euro - Afro Asian Sweepstake|urawinner|Free Lotto Sweepstakes|PROMOTION DEPARTMENT|PROMOTION\/PRIZE AWARD|Nederlandse Internationale Loterij|EURO MILLIONS|APPLE LOTTERY ONLINE|MSW MEGA JACKPOT|MICROSOFT EMAIL PROMO|MSNlottery|ECOWAS|Nigeria|National Lottery|claim.{1,10}your.gbp|won.you.{1,10}gbp)/isProblem was ] at {1,10]. It should be .{1,10}.
cPanel should update these files in next release.
Files are more then 1 decade (10 years) old in some cases.
0 -
studiofaca - can you let me know how I can reproduce this issue on a test server so I can send this over to the developers?
0 -
/usr/local/cpanel/3rdparty/bin/spamassassin --lint
0 -
Running that command by itself doesn't give me any output on a version 128 test machine.
0 -
Check year of release
vi /etc/mail/spamassassin/KAM.cf
Example:
#Copyright 2015 - bug
#Copyright 2017 - it working
#Copyright 2022 - latest?
You can compare file with this one from:
https://www.pccc.com/downloads/SpamAssassin/contrib/KAM.cf
3 of 4 servers had 2015 with bug.
1 had 2017 without bug.
All should have latest version 2022 or newer on cPanel 128.x
0 -
What version of cPanel were the servers with the older copyright dates?
0 -
Thanks for that link - I've added this thread to the development case as well.
0 -
128.0.14
128.0.7
0 -
How to update:
https://mcgrail.com/template/kam.cf_channel
Latest version from official source:
https://mcgrail.com/downloads/KAM.cf
KAM.cf 2025-06-18 13:44
0
Please sign in to leave a comment.
Comments
15 comments