|
|||
|
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 ? |
|
|||
|
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. |
|
||||
|
Quote:
Code:
#!/bin/bash IFS="$" cd /home find ./*/.spamassassin -maxdepth 1 -type 'f' -name 'auto-whitelist' -size +10M | xargs rm -f 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.
__________________
My Server Expert: Server support, security, and management! |
|
|||
|
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. |
|
||||
|
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.
__________________
My Server Expert: Server support, security, and management! |
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
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 ![]() Trev |
|
|||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|