bogofilter daemon?

Matthias Andree matthias.andree at gmx.de
Tue Dec 6 14:26:07 CET 2005


Robin Bowes <robin-lists at robinbowes.com> writes:

> Does anyone know of a bogofilter daemon that could be used to service
> multiple users in a vpopmail ISP environment?
>
> I'm thinking along the lines of writing a plugin for qpsmtpd to run
> messages through bogofilter. This would be possible without a daemon,
> but there may be security issues in accessing .bogofilter directories
> stored in /home/vpopmail/domains/<domain>/<user> directory.

Indeed, because bogofilter does not currently do access control. You can
however use a non-transactional database file for read-only in the
"multiple wordlists", so you can provide some default database and let
user registrations override this.

The thought that crossed *my* mind was "what if the database isn't
SQLite3, but PostgreSQL"? Does anyone have thoughts on this?

How about the database size if a user creates a million records in his
user-specific table?

While I think I could write a PostgreSQL plugin on the basis of the
existing SQLite3 code, I'm not *that* skilled as PostgreSQL admin. :-)

A split model could work by just breaking the message down into tokens
on the client, then ask the database the spamicity values (server task
to look them up and return them) and the calculation would again be a
client task.

> I suppose the bogofilter DBs could be stored somewhere else, e.g.
> /var/qpsmtpd/bogofilter/<domain>/<local>
>
> I suspect that performance would be better with a long-running daemon
> servicing requests via a tcp or unix socket.

Not much, and scalability also becomes an issue. Besides that, as the
current code isn't supposed to be multithreaded (which would harm
portability somewhat), it would start off as a forking model (perhaps
pre-forked) anyways.

> Having said that, it will have to open a different wordlist for each
> email so maybe there's not much benefit in using a daemon?

It's a complex matter in the first place.

-- 
Matthias Andree



More information about the Bogofilter mailing list