diff --git a/Changes b/Changes index 1d4dc7d..c305f0a 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,9 @@ 0.33 (to be) - Correct header parsing of "space only" lines (Joerg Meyer) + greylisting: fix db_dir configuration option so it actually works + (kitno455, issue #6) + + Correct header parsing of "space only" lines (Joerg Meyer, issue #11) Update the sample configuration to use zen.spamhaus.org diff --git a/plugins/greylisting b/plugins/greylisting index e21bf40..9f513e0 100644 --- a/plugins/greylisting +++ b/plugins/greylisting @@ -129,7 +129,7 @@ my $DENYMSG = "This mail is temporarily denied"; my ($QPHOME) = ($0 =~ m!(.*?)/([^/]+)$!); my $DB = "denysoft_greylist.dbm"; my %PERMITTED_ARGS = map { $_ => 1 } qw(per_recipient remote_ip sender recipient - black_timeout grey_timeout white_timeout deny_late mode); + black_timeout grey_timeout white_timeout deny_late mode db_dir); my %DEFAULTS = ( remote_ip => 1, @@ -206,6 +206,10 @@ sub denysoft_greylist { return DECLINED if $self->qp->connection->notes('whitelisthost'); return DECLINED if $transaction->notes('whitelistsender'); + if ($config->{db_dir} =~ m{^([-a-zA-Z0-9./_]+)$}) { + $config->{db_dir} = $1; + } + # Setup database location my $dbdir = $transaction->notes('per_rcpt_configdir') if $config->{per_recipient_db};