[svn:qpsmtpd] r672 - in branches/0.3x: . plugins
[email protected] Sun, 5 Nov 2006 02:38:17 -0800 (PST)
| Newsgroups | perl.cvs.qpsmtpd |
|---|---|
| Message-ID | <[email protected]> |
Author: aqua
Date: Sun Nov 5 02:38:16 2006
New Revision: 672
Modified:
branches/0.3x/Changes
branches/0.3x/plugins/greylisting
Log:
Support configured greylisting db location, and look in the distro-friendly
directory /var/lib/qpsmtpd in addition to the previous $QPHOME locations.
Modified: branches/0.3x/Changes
==============================================================================
--- branches/0.3x/Changes (original)
+++ branches/0.3x/Changes Sun Nov 5 02:38:16 2006
@@ -2,6 +2,10 @@
Add support for multiple plugin directories, whose paths are given by the
'plugin_dirs' configuration. (Devin Carraway, Nick Leverton)
+ Greylisting DBs may now be stored in a configured location, and are
+ looked for by default in /var/lib/qpsmtpd/greylisting in addition to the
+ previous locations relative to the qpsmtpd binary. (Devin Carraway)
+
0.33
New Qpsmtpd::Postfix::Constants to encapsulate all of the current return
codes from Postfix, plus script to generate it. (Hanno Hecker)
Modified: branches/0.3x/plugins/greylisting
==============================================================================
--- branches/0.3x/plugins/greylisting (original)
+++ branches/0.3x/plugins/greylisting Sun Nov 5 02:38:16 2006
@@ -78,6 +78,22 @@
greylisting off globally if using per_recipient configs).
Default: denysoft.
+=item db_dir <path>
+
+Path to a directory in which the greylisting DB will be stored. This
+directory must be writable by the qpsmtpd user. By default, the first
+usable directory from the following list will be used:
+
+=over 4
+
+=item /var/lib/qpsmtpd/greylisting
+
+=item I<BINDIR>/var/db (where BINDIR is the location of the qpsmtpd binary)
+
+=item I<BINDIR>/config
+
+=back
+
=item per_recipient <bool>
Flag to indicate whether to use per-recipient configs.
@@ -85,7 +101,8 @@
=item per_recipient_db <bool>
Flag to indicate whether to use per-recipient greylisting
-databases (default is to use a shared database).
+databases (default is to use a shared database). Per-recipient configuration
+directories, if determined, supercede I<db_dir>.
=back
@@ -191,7 +208,10 @@
# Setup database location
my $dbdir = $transaction->notes('per_rcpt_configdir')
if $config->{per_recipient_db};
- $dbdir ||= -d "$QPHOME/var/db" ? "$QPHOME/var/db" : "$QPHOME/config";
+ for my $d ($dbdir, $config->{db_dir}, "/var/lib/qpsmtpd/greylisting",
+ "$QPHOME/var/db", "$QPHOME/config") {
+ last if $dbdir ||= $d && -d $d && $d;
+ }
my $db = "$dbdir/$DB";
$self->log(LOGINFO,"using $db as greylisting database");