> I have three separate IMAP accounts (two for work, one personal). I > was wondering how I could set up separate SpamBayes > configuration files for each account. [...] > But I'm not sure how to tell each instance where to find the > appropriate config file.
The script (any SpamBayes script) will try and find configuration files that are in the BAYESCUSTOMIZE environment variable, or called .spambayesrc in your home directory, or bayescustomize.ini in the current working directory. So you can call the script from different directories, e.g.: account1/> python /path/to/spambayes/scripts/sb_imapfilter.py -c -t account2/> python /path/to/spambayes/scripts/sb_imapfilter.py -c -t Or setup the BAYESCUSTOMIZE environment variable for each one, e.g.: env BAYESCUSTOMIZE=/path/to/config/account1.ini python scripts/sb_imapfilter.py -c -t env BAYESCUSTOMIZE=/path/to/config/account2.ini python scripts/sb_imapfilter.py -c -t Or (and this is possibly the simplest) you can use the -o command line option to specify the options you wish to set, e.g.: python scripts/sb_imapfilter.py -c -t -o imap:username:user1 -o imap:password:pass1 -o imap:server:server1.example.com python scripts/sb_imapfilter.py -c -t -o imap:username:user2 -o imap:password:pass2 -o imap:server:server2.example.com > I'm also wondering if each instance can use > the same hammie.db and spambayes.messageinfo.db, or if each > one needs a separate version of each. You shouldn't have any problems sharing if all the script is doing is classifying. However, if they are also going to be training, then that is a problem. Using a separate database for each would solve that, although that would seem a right PITA to me. The right way to solve this, I think, is to say that you'd like this solved (ideally, fill out a feature request on sourceforge: <http://sf.net/projects/spambayes>) and I'll get to this for 1.1a1. =Tony.Meyer -- Please always include the list ([email protected]) in your replies (reply-all), and please don't send me personal mail about SpamBayes. http://www.massey.ac.nz/~tameyer/writing/reply_all.html explains this. _______________________________________________ [email protected] http://mail.python.org/mailman/listinfo/spambayes Check the FAQ before asking: http://spambayes.sf.net/faq.html
