Support configured greylisting db location, and look in the distro-friendly
directory /var/lib/qpsmtpd in addition to the previous $QPHOME locations. git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@672 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
af5f025b51
commit
b52b7b50c2
4
Changes
4
Changes
@ -2,6 +2,10 @@
|
|||||||
Add support for multiple plugin directories, whose paths are given by the
|
Add support for multiple plugin directories, whose paths are given by the
|
||||||
'plugin_dirs' configuration. (Devin Carraway, Nick Leverton)
|
'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
|
0.33
|
||||||
New Qpsmtpd::Postfix::Constants to encapsulate all of the current return
|
New Qpsmtpd::Postfix::Constants to encapsulate all of the current return
|
||||||
codes from Postfix, plus script to generate it. (Hanno Hecker)
|
codes from Postfix, plus script to generate it. (Hanno Hecker)
|
||||||
|
@ -78,6 +78,22 @@ deliveries); in 'off' mode we do nothing (useful for turning
|
|||||||
greylisting off globally if using per_recipient configs).
|
greylisting off globally if using per_recipient configs).
|
||||||
Default: denysoft.
|
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>
|
=item per_recipient <bool>
|
||||||
|
|
||||||
Flag to indicate whether to use per-recipient configs.
|
Flag to indicate whether to use per-recipient configs.
|
||||||
@ -85,7 +101,8 @@ Flag to indicate whether to use per-recipient configs.
|
|||||||
=item per_recipient_db <bool>
|
=item per_recipient_db <bool>
|
||||||
|
|
||||||
Flag to indicate whether to use per-recipient greylisting
|
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
|
=back
|
||||||
|
|
||||||
@ -191,7 +208,10 @@ sub denysoft_greylist {
|
|||||||
# Setup database location
|
# Setup database location
|
||||||
my $dbdir = $transaction->notes('per_rcpt_configdir')
|
my $dbdir = $transaction->notes('per_rcpt_configdir')
|
||||||
if $config->{per_recipient_db};
|
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";
|
my $db = "$dbdir/$DB";
|
||||||
$self->log(LOGINFO,"using $db as greylisting database");
|
$self->log(LOGINFO,"using $db as greylisting database");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user