many users

Chris Wilkes cwilkes-bf at ladro.com
Mon Jun 7 02:27:59 CEST 2004


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



More information about the Bogofilter mailing list