Skip to main content

Unescaped left brace in regex is deprecated sa-learn error

Comments

15 comments

  • km9
    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
  • km9
    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
  • cPanelLauren
    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.conf
    0
  • km9
    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
  • studiofaca

    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)/is

    replace 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)/is

     

    Problem 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
  • cPRex Jurassic Moderator

    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
  • studiofaca
    /usr/local/cpanel/3rdparty/bin/spamassassin --lint
    0
  • cPRex Jurassic Moderator

    Running that command by itself doesn't give me any output on a version 128 test machine.

    0
  • studiofaca

    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
  • cPRex Jurassic Moderator

    What version of cPanel were the servers with the older copyright dates?

    0
  • cPRex Jurassic Moderator

    Thanks for that link - I've added this thread to the development case as well.

    0
  • studiofaca

    128.0.14

    128.0.7

    0
  • studiofaca

    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.