[Mimedefang] Re: Greylist DB addition fails silently?

Jeremy Mates jmates at sial.org
Thu Jun 24 00:13:16 EDT 2004


* Justin <justin at othius.com>
> Be careful with single point of failure. I believe many here have
> noted that it's better to just have an independent greylist db on
> each relay.

With a global database handle, one can disable greylisting, though you
also need a) warnings if the connection is down and b) a way to throttle
back such warnings.

our $dbh;
init_db();

sub init_db {
  # code to bring up $dbh
  # prep SQL handles, etc.
}

sub filter_* {
  init_db() unless $dbh and $dbh->ping;

  do_sql_stuff() unless $dbh;
}

If you were feeling extra clever and had spare time, you could use both
a shared database, and switch to using a local database (SQLite, for
instance) should the shared one be down, with some degree of copying
from the shared one into the local database as needed. Merging things
from the local copies up to the shared database following downtime might
be tricky, though.



More information about the MIMEDefang mailing list