The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cPanel overwriting SA rules on a daily basis

Discussion in 'E-mail Discussions' started by net-trend, Jan 12, 2015.

Tags:
  1. net-trend

    net-trend Member

    Joined:
    Sep 17, 2002
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Since the last few updates, cPanel somehow updates SA rules on a daily basis and overwrites all manually edited files. Is there a way to turn off the daily SA rule updates?
     
  2. fingerprn

    fingerprn Member

    Joined:
    Feb 19, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    I'm pretty sure the same thing happened to me. Just checked my /etc/mail/spamassassin/local.cf file and all of my custom rules are gone.

    However, I don't want to turn off the daily rule updates for spamassassin, but I would like to know why my local file has been overwritten and how to prevent it from happening again. Thanks!
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,808
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  4. tawfiq

    tawfiq Active Member

    Joined:
    Mar 13, 2004
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    I can confirm this happening on my servers as well, cpanel updates overwriting /etc/mail/spamassassin/local.cf all my custom rules were gone.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,808
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  6. ralphday

    ralphday Member

    Joined:
    Jun 5, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    What about releases later than 11.52????
     
  7. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    262
    Likes Received:
    12
    Trophy Points:
    18
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    Yeah cPanel on major version updates is still replacing local.cf and v*.pre files with defaults instead of leaving them alone. It does create .rpmsave files so you can revert changes but I don't see the reason these files are messed with in the first place. As far as I understand new changes to Spamassassin are introduced with a new.pre file for that version.

    I've added a Feature Request (pending moderation).
     
  8. ralphday

    ralphday Member

    Joined:
    Jun 5, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Should be a bug considering that cPanel tells you to put your custom rules there. Wiping out user configuration files on automatic updates without warning or notice is not documented behavior.
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,808
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Would you mind sharing the links to the documentation or options in cPanel/WHM that reference these instructions so we can open an internal case to address the issue? Currently, there's a document at:

    How to Configure the Apache SpamAssassin Report_Safe Option - cPanel Knowledge Base - cPanel Documentation

    However, it states:

    Would you mind sharing the URL to the feature request?

    Thank you.
     
  10. ralphday

    ralphday Member

    Joined:
    Jun 5, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    @cPanelMichael,

    You personally have recommended using local.cf for spamassassin as "the right way to change SpamAssassin rule score"
    Right way to change SpamAssasin rule score

    and as the place to make Custom SpamAssassin Rules
    Custom SpamAssassin Rules

    and as the place to put SpamAssassin Custom ruleset files
    Apache SpamAssassin custom ruleset files

    and another recommendation to use local.cf by you
    Spam assassin rewrite_header not working

    Also, cPanel puts lines in local.cf like this:
    Code:
    dns_available yes # Autoconfigured by cPanel - comment out this line or set to no to avoid future updates
    
    pyzor_options --homedir /etc/mail/spamassassin # Autoconfigured by cPanel - comment out this line to avoid future updates
    
    Uncommenting those lines to make them permanent won't work when local.cf gets overwritten during upgrades so its not working as documented right in the local.cf file.

    Oh, and the very first line of local.cf says "This is the right place to customize your installation of SpamAssassin."
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,808
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Thank you for reporting those forum threads. cPanel version 11.52 was published to the "Release" build tier on 10/12/15, so while those threads are from older dates, I'll update them with a link to the new document in-case users reach those threads from search results on our forums here, or on search engines. Also, the "Report" option under the "Tools" menu on a post is available anytime you need to report outdated or incorrect information on a post.

    As far as the document, I'll open a case with our documentation team and provide an update here with more details.

    Thank you.
     
  12. ralphday

    ralphday Member

    Joined:
    Jun 5, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    What new document? That's what I was asking about in the first place. I can find no doc that says how we should be doing things in a post-52 world.

    I just ran into another thread with this post: Customize SpamAssassin score

    Sounds like someone at cPanel is recommending putting your own .cf file in /etc/mail/spamassassin instead of modifying local.cf. Is that what we should be doing now? Will it survive upgrades?

    If that doesn't work and there is no way to make global spamassassin changes without them getting wiped out by an upgrade post-52 can you just come right out and say that instead of just saying here's how to do it in older releases and not mentioning newer releases?
     
  13. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    262
    Likes Received:
    12
    Trophy Points:
    18
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    It ended up being declined as a feature request and Benny opened a Bug instead as CPANEL-6016.
     
  14. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,808
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    As mentioned, CPANEL-6016 is open to address this issue. I'll keep this thread updated with the status of this case. In the meantime, yes, the instructions in the following post will allow you to retain custom changes through the use of individual custom configuration files:

    Customize SpamAssassin score

    Thank you.

    Update: This case is included in cPanel version 60:

    Fixed case CPANEL-6016: Updated SpamAssassin to 3.004001-cp1156.
     
    #14 cPanelMichael, May 6, 2016
    Last edited: Sep 30, 2016
  15. bloatedstoat

    bloatedstoat Well-Known Member

    Joined:
    Jun 14, 2012
    Messages:
    76
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Victoria, Australia
    cPanel Access Level:
    Root Administrator
    We've had a "/etc/mail/spamassassin/custom.cf" file in place for some time with custom rules and scoring and the file has survived intact following updates/upgrades.
     
  16. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    262
    Likes Received:
    12
    Trophy Points:
    18
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    It looks the order of precedence for the files in /etc/mail/spamassassin/ are alphabetical, so to override anything in init.pre, local.cf or the v3xx.pre files, it'd be safer using a file starting with a Z, perhaps zenith.cf. :)
     
Loading...

Share This Page