develooper Front page | perl.cvs.qpsmtpd | Postings from March 2007

[svn:qpsmtpd] r724 - in trunk: . plugins

From:
ask
Date:
March 14, 2007 23:51
Subject:
[svn:qpsmtpd] r724 - in trunk: . plugins
Message ID:
20070315065137.E38D3CBA2F@x12.develooper.com
Author: ask
Date: Wed Mar 14 23:51:37 2007
New Revision: 724

Modified:
   trunk/Changes
   trunk/plugins/greylisting

Log:
  greylisting: fix db_dir configuration option so it actually works
  (kitno455, issue #6)

  http://code.google.com/p/smtpd/issues/detail?id=6



Modified: trunk/Changes
==============================================================================
--- trunk/Changes	(original)
+++ trunk/Changes	Wed Mar 14 23:51:37 2007
@@ -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
 

Modified: trunk/plugins/greylisting
==============================================================================
--- trunk/plugins/greylisting	(original)
+++ trunk/plugins/greylisting	Wed Mar 14 23:51:37 2007
@@ -129,7 +129,7 @@
 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 @@
   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};



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About