--- a/exim-exigrey.pl Wed Jan 03 12:06:41 2007 +0000
+++ b/exim-exigrey.pl Wed Jan 03 16:23:19 2007 +0000
@@ -35,6 +35,9 @@
# record structure: key: item\0
# value: timestamp(creation) timestamp(usage)\0
# (This way we're compatible with ${lookup{...}dbm{...}})
+#
+# dbm file is relativ to $spool_directory/grey, EXCEPT its name
+# starts with "./" or "/".
sub unseen($;$$) {
my ($item, $delay, $db) = @_;
$item .= "\0";
@@ -45,7 +48,7 @@
my $rc;
my %h;
- $db = connectDB(\%h, $db || $DEFAULT{db});
+ $db = connectDB(\%h, $db);
if (not exists $h{$item}) {
$h{$item} = "$now $now\0";
@@ -97,7 +100,7 @@
sub connectDB($$) {
my ($h, $db) = @_;
- $db = getDBDir() ."/$db" unless $db =~ /^\//;
+ $db = getDBDir() ."/$db" unless $db =~ m(^\.?/);
# Creation of DB-File if it doesn't exist
# to avoid races we change our own uid/gid for creation of