Re: [exim] Penalty Box - Caching Sebder Verify Data

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Steven A. Reisman
Dátum:  
Címzett: Exim-users
CC: 
Tárgy: Re: [exim] Penalty Box - Caching Sebder Verify Data
On Wed, Feb 16, 2005 at 09:08:00AM +0000, Nigel Metheringham wrote:
> On Tue, 2005-02-15 at 14:49 -0600, Steven A. Reisman wrote:
> > Hmmm... how hard would it be to add dbmwrite capability.


> It would need syntax to be added to the exim side, and more in the way
> of locking etc.


The code, including the locking, should already be in exim. Isn't that
how the hint databases are maintained? We would just need an external
interface...

${dbmwrite {filename}{primarykey}{data}}

The dbm files can be kept in /var/spool/exim4/db along with the hints.
They could be structured so that they can be externally maintained
with exim_tidydb.


> My inclination would be to not do this, but maybe add sqllite support to
> lookups - this should be really pretty easy to do, and give you full sql
> support. Sqllite would then be another package dependency (which might
> not please packagers).


Using DBM files wouldn't be as general as an SQL extension. We'd be
subject to "dirty writes" and "unrepeatable reads". Thus, it wouldn't
be possible to, say, increment a stored value. But, there would be no
additional package dependencies, and it would add a way to save simple
state information between incarnations of exim.

<I admit this is the first time I've looked at Exim code in years ... I'm
looking at dbfn.c ...>

Hmmm. I see this disclaimer:

All the data in Exim's database is in the nature of *hints*. Therefore
it doesn't matter if it gets destroyed by accident. These functions
are not supposed to implement a "safe" database.

Which would be tolerable for greylisting or caching applications.

<... and now expand.c ...>

It looks like the external hook would be placed in expand.c similar
to "run" or "perl". The code would access the routines in dbfn.c.
Status could be returned as an expansion or a "fail".


>     Nigel.


Steve


----------------------------------------------------------------------
Steven A. Reisman          <sar@???>           P.O. Box 409
Press Enter LLP                                       421 N 2nd Street
715-426-2100 or 651-436-5254                    River Falls, WI  54022
----------------------------------------------------------------------