Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Nov 2003
    Posts
    9

    Default very large file auto-whitelist how I autodelete ?

    In some account I have a very large (more thant 30 MB !) file auto-whitelist.
    I know this file is used by spamassassin but this file is owned by domain account and the space calculated under quota.

    I have read with check_whitelist program I can clean this file but on my server this file is not present and I don't want to reinstall spamassassing from and rpm because I risk a system crash !

    Any idea on how I can clean these files with a cron ?

  2. #2
    Member
    Join Date
    Jan 2008
    Location
    Buenos Aires, Argentina
    Posts
    833
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Hi, I don't like to revive old threads, but I'm at the same situation:
    I wanted to use check_whitelist but I found that it is not bundled with the SA install in cPanel.
    Is there any reason for that?
    Content is the king. Usability is my God.

  3. #3
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Exclamation

    I have read with check_whitelist program I can clean this file but on my server this file is not present and I don't want to reinstall spamassassing from and rpm because I risk a system crash !

    Any idea on how I can clean these files with a cron ?
    Basically in a nutshell ...
    Code:
    #!/bin/bash
    IFS="$"
    
    cd /home
    
    find ./*/.spamassassin -maxdepth 1 -type 'f' -name 'auto-whitelist' -size +10M | xargs rm -f
    The above basic shell script code performs a search for any "auto-whitelist"
    files stored in the spamassassin settings folders for each account and
    displays only those that are larger than 10 Megabytes (+10M) and that
    list is piped into the 'xargs' which executes 'rm -f' against each file found.

  4. #4
    Member
    Join Date
    Jan 2008
    Location
    Buenos Aires, Argentina
    Posts
    833
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Good for you, but we wanted to delete unuseful data, not to fully erase it

    I wonder if sa-learn does a similar job than check_whitelist after learning. Or it only applies on email files?
    Content is the king. Usability is my God.

  5. #5
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Exclamation

    How would you determine what is meaningful and what is not?

    Incidentally, when the bayes auto whitelisting databases grow that large,
    they are often by their very nature filled with a lot of data that should
    not be whitelisted in the first place which is incidentally the reason
    I generally leave autowhitelisting (which is based on huristtics) disabled
    on Spamassassin and instead manually whitelist those addresses that
    appear in my email account address book as valid contacts.

    I then try to configure the mail rules (/usr/share/spamassassin) to
    be as accurate as possible and hit the most spam possible without
    false positives being triggered in legitimate mail.

  6. #6
    Member
    Join Date
    Jan 2008
    Location
    Buenos Aires, Argentina
    Posts
    833
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Good point. I thought check_whitelist may determine that, but in the end you're right: Heuristics results don't deserve great attention. The script worked fine, thanks!

    In regards of disabling autowhitelisting, I didn't knew it may be done if using cPanel. Is it a persistent config or will it be reset every time you upgrade cPanel again?

    And about editing your own rules, it goes beyond my knowledge about SA. Although I'm up to learn
    Content is the king. Usability is my God.

  7. #7
    Member
    Join Date
    Jan 2008
    Location
    Buenos Aires, Argentina
    Posts
    833
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    All in all: all this didn't answered my question: why isn't the check_whitelist script bundled in the SpamAssassin installation even if it's supposed to be present.
    Content is the king. Usability is my God.

  8. #8
    Member
    Join Date
    Nov 2003
    Posts
    67

    Default

    Just a little tweak to this. On Cenros 4.7 at least the -size 10M returns an error about M not being a valid option. In that case it would need to be this I guess as it only goes to kilobytes.

    Code:
    #!/bin/bash
    IFS="$"
    
    cd /home
    
    find ./*/.spamassassin -maxdepth 1 -type 'f' -name 'auto-whitelist' -size +10240k | xargs rm -f
    Runs without an error anyway so think it worked.

    Trev

  9. #9
    Member
    Join Date
    Jan 2008
    Location
    Buenos Aires, Argentina
    Posts
    833
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Exactly. Me too. I forgot to comment about that -size parameter.
    It will be great if more SA mantainance tips may be shared as there are not so much elsewhere.
    Content is the king. Usability is my God.

Similar Threads & Tags
Similar threads

  1. User had all spam addresses auto added to SA's Whitelist
    By WindyT in forum E-mail Discussions
    Replies: 2
    Last Post: 04-04-2011, 12:04 AM
  2. Everyone gets written to .spamassassin/auto-whitelist file
    By Tritech in forum E-mail Discussions
    Replies: 1
    Last Post: 09-09-2010, 05:36 PM
  3. open of auto-whitelist file failed
    By lisatutt in forum E-mail Discussions
    Replies: 0
    Last Post: 08-23-2008, 04:17 PM
  4. Replies: 7
    Last Post: 04-10-2006, 07:25 AM
  5. Limiting auto-whitelist disk usage (AWL) in SpamAssassin
    By pubwvj in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 07-02-2005, 11:57 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube