[Spambayes] Can I move default database?

Ryan Malayter rmalayter at bai.org
Tue Dec 9 18:01:49 EST 2003


> From: Kenny Pitt

> Yes, it's configurable...
> [General]
> data_directory: C:\NewDataDirectory

Technically, the correct place for per-user, per-machine settings like
SpamBayes databases is (in Windows 2000 and newer):
   c:\documents and settings\username\local settings\application
data\SpamBayes
This keeps the databases as part of the individual user's profile, but
it stays on the local machine and doesn't roam with the rest of the
profile to the network.
 
> First, you'll need to make sure that SpamBayes is installed 
> on every computer that a user might roam to. 

This isn't completely necessary. If SpamBayes isn't installed on a
machine, any files in these directories will simple be ignored - no
error messages or anything. Of course, spam will not be filtered, but
nothing really bad will happen.

> Second, you'll need to make sure that the C:\NewDataDirectory 
> you specify is valid on every computer...

Yes. The directory:
     c:\documents and settings\username\local settings\application data\
Will already be in every profile, but you'll have to create a SpamBayes
subdirectory. This can be easily automated by adding this command to
your login scripts (all on one line):
   IF NOT EXIST mkdir "%USERPROFILE%\Local Settings\Application Data\
     SpamBayes" mkdir "%USERPROFILE%\Local Settings\Application
Data\SpamBayes"

> have a separate C:\NewDataDirectory for each user so that 
> users don't end up sharing training data. And fourth, be 
> aware that users will have to re-configure and re-train 
> SpamBayes on each computer that they use, 

You could copy small "default" databases to their profiles using a
similar commands to those I'm showing above.

> ...filtering accuracy will vary depending on which computer they are 
> using. 

This is why using a default database might be a bad idea.

> You can alleviate some of these issues by pointing the 
> data_directory to a location on a network drive, but I have 
> no idea what the performance would be like in that case.

I've tried this, and performance is not bad on my network. I've used the
user's home directory, defined by the %HOMESHARE%\%HOMEPATH% environment
variable. You can automate the INI file-path settings with login
scripts, or with Windows Installer packaging.

Regards,
	Ryan



More information about the Spambayes mailing list