many users

David Relson relson at osagesoftware.com
Mon Jun 7 03:43:58 CEST 2004


On Sun, 6 Jun 2004 17:27:59 -0700
Chris Wilkes wrote:

> On Sun, Jun 06, 2004 at 08:13:55PM -0400, Tom Allison wrote:
> > 
> > Setting up individual user accounts might not be practical. I can
> > easily enough add them all with /bin/false as their login shell
> > and not have an issue with security. But now I have a lot of files
> > to manage.
> 
> You should look into your mail server's support for virtual users. 
> What I've done under qmail-ldap (that's qmail with the LDAP patches)
> that has one "real" user and all the user's directories are stored
> under
>   /var/qmail/maildirs/ou/uid/
> where "ou" and "uid" are an individual's LDAP entries.
> 
> When an account receives its first email a script is run that sets up
> the /var/qmail/maildirs/ou/uid/.bogofilter directory with a default
> wordlist file.  Also a .qmail file is generated like so:
>   | condtomaildir ./Maildir/.spam/ /usr/bin/bogofilter -d \
>     /var/qmail/maildirs/OOO/uuuuu/.bogofilter
> 
> >From there its up to you on how to manage it, but 10 users is the
> >same
> as 1000 in this case.  Plus now you can easily do things like
>   cd /var/qmail/maildirs
>   for i in */*/.bogofilter/wordlist.db; do
>     echo -n "$i "; bogoutil -w $i .MSG_COUNT | tail -1;
>   done
> 
> The trick is in the use of the "-d new/wordlist/dir" switch.
> 
> Chris

Chris and Tom,

Unless I miss my guess, individual wordlists are very simple.  

By default bogofilter uses environment variables $HOME or
$BOGOFILTER_DIR to determine where to find/put the wordlist.  In the
simplest case, bogofilter will put the wordlist in directory
~/.bogofilter (where the value of ~ is defined by $HOME).  Alternatively
if $BOGOFILTER_DIR is defined, then $BOGOFILTER_DIR/wordlist.db will be
used.

Assuming your environment is set up sanely, bogofilter should just work
for multiple users.  There's no need for tricks.

HTH,

David



More information about the Bogofilter mailing list