Subject: | Make the Module check for Qualifier Defaults |
Hi,
i added an patch for the testcase which shows that the Module currently
doesnt respect defaults for the Qualifier f.e. doesnt check "Qualifier:".
This is a mandatory feature in the Access.DB f.e. for specifying global
connection limits.
Additionally i added another patch which will add this feature to the
Module.
Regards,
Stephan
Subject: | AccessDB.patch |
--- lib/Sendmail/AccessDB.pm.orig 2012-08-22 11:13:59.000000000 +0200
+++ lib/Sendmail/AccessDB.pm 2012-08-22 11:14:40.000000000 +0200
@@ -250,6 +250,8 @@
@check_list = ($address);
}
+ push(@check_list, '');
+
my %access;
my $filename = $DB_FILE;
@@ -262,6 +264,7 @@
-Filename => $filename
or die "Cannot open file $filename: $! $BerkeleyDB::Error\n";
+
foreach my $key (@check_list)
{
my $lookup = $key;
Subject: | 03_functions.patch |
--- t/03_functions.t.orig 2012-08-22 11:08:41.000000000 +0200
+++ t/03_functions.t 2012-08-22 11:12:33.000000000 +0200
@@ -1,7 +1,7 @@
# t/03_functions.t; test the basic functions
$|++;
-print "1..5
+print "1..7
";
my($test) = 1;
@@ -19,6 +19,12 @@
{ print "ok $test\n";}else{ print "not ok $test\n"; }
$test++;
+$friend = Sendmail::AccessDB::spam_friend('foo@bar.de');
+if ( (defined $friend) and ($friend eq 'FOE'))
+ { print "ok $test\n";}else{ print "not ok $test\n"; }
+$test++;
+
+
my $whitelisted = Sendmail::AccessDB::whitelisted('foo.test.example.com','type'=>'hostname');
if ( (defined $whitelisted) and ($whitelisted))
{ print "ok $test\n" }else{ print "not ok $test\n"; }
@@ -37,5 +43,11 @@
if ($wltwo) { print "ok $test\n" } else { print "not ok $test\n"; };
$test++;
+my $should_be_skip = Sendmail::AccessDB::lookup('user@foo.bar.tld2','qualifier'=>'Qual','type'=>'mail');
+if ($should_be_skip eq "SKIP") { print "ok $test\n" } else { print "not ok $test\n"; };
+$test++;
+
+
+
# end of t/03_functions.t