#1 (permalink)  
Old 05-24-2006, 06:06 AM
Registered User
 
Join Date: Nov 2003
Posts: 9
sirswatch
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 ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-01-2009, 01:24 AM
Registered User
 
Join Date: Jan 2008
Location: behind the sun
Posts: 409
Kent Brockman is on a distinguished road
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 king. Functionality is a gift. Usability is God.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-01-2009, 01:51 AM
Spiral's Avatar
Registered User
 
Join Date: Jun 2005
Location: Area 51
Posts: 1,501
Spiral is on a distinguished road
Exclamation

Quote:
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-01-2009, 01:53 AM
Registered User
 
Join Date: Jan 2008
Location: behind the sun
Posts: 409
Kent Brockman is on a distinguished road
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 king. Functionality is a gift. Usability is God.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-01-2009, 02:06 AM
Spiral's Avatar
Registered User
 
Join Date: Jun 2005
Location: Area 51
Posts: 1,501
Spiral is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-01-2009, 08:00 PM
Registered User
 
Join Date: Jan 2008
Location: behind the sun
Posts: 409
Kent Brockman is on a distinguished road
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 king. Functionality is a gift. Usability is God.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 07-01-2009, 08:14 PM
Registered User
 
Join Date: Jan 2008
Location: behind the sun
Posts: 409
Kent Brockman is on a distinguished road
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 king. Functionality is a gift. Usability is God.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 07-03-2009, 05:34 AM
Registered User
 
Join Date: Nov 2003
Posts: 59
trevHCS is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 07-03-2009, 09:10 AM
Registered User
 
Join Date: Jan 2008
Location: behind the sun
Posts: 409
Kent Brockman is on a distinguished road
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 king. Functionality is a gift. Usability is God.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:15 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc