Re: Expiring Bayes; aka bayes files are BIG

2010-09-15 Thread RW
On Wed, 15 Sep 2010 11:18:20 -0400
Dennis German  wrote:

> On Aug 26, 2010, at 10:11 AM, Grant Peel wrote:
> ...
>  ~/.spamassassin/bayes* files had grown to 1.5 GB
> > I have put:
> > use_bayes 0
> > bayes_auto_learn0
> > bayes_auto_expire   1
> > bayes_expiry_max_db_size 5
> > in the local.cf file, and restarted spamd.
> > 
> > The database did not appear to trim, so I tried:   sa-learn -u
> > "user" -D --force-expire and the database is still 1.5 GB.
> > I know I am doing something(s) incorrect, but can't figure out what.
> > How do I properly trim the offending file(s)?
> > Is there a command to trim all databases (sers) on the box?
> > Any advice would be appreciated.   Spamassassin 3.2.5,  FreeBSD 8.0
> > -Grant 
> > 
> I believe that  bayes_seen is a perl hash and will not be reduced in
> size by deleting entries. The only way to reduce it's size is to have
> a program read the current file, entry by entry and output to a new
> file. This will not copy deleted entries and the output will be
> significantly smaller. I don't know of any program, but if there is
> interest I might write one. Dennis German
> 
It's straightforward to do it with backup and restore, but the problem
is that that there is no time field. You might just as well delete
the file periodically.  


Re: Expiring Bayes; aka bayes files are BIG

2010-09-15 Thread Dennis German
On Aug 26, 2010, at 10:11 AM, Grant Peel wrote:
...
 ~/.spamassassin/bayes* files had grown to 1.5 GB
> I have put:
> use_bayes 0
> bayes_auto_learn0
> bayes_auto_expire   1
> bayes_expiry_max_db_size 5
> in the local.cf file, and restarted spamd.
> 
> The database did not appear to trim, so I tried:   sa-learn -u "user" -D 
> --force-expire
> and the database is still 1.5 GB.
> I know I am doing something(s) incorrect, but can't figure out what.
> How do I properly trim the offending file(s)?
> Is there a command to trim all databases (sers) on the box?
> Any advice would be appreciated.   Spamassassin 3.2.5,  FreeBSD 8.0
> -Grant 
> 
I believe that  bayes_seen is a perl hash and will not be reduced in size by 
deleting entries.
The only way to reduce it's size is to have a program read the current file, 
entry by entry and
output to a new file. This will not copy deleted entries and the output will be 
significantly smaller.
I don't know of any program, but if there is interest I might write one.
Dennis German