More tests.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Mon, 29 Sep 2008 21:23:49 +0000 (23:23 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Mon, 29 Sep 2008 21:23:49 +0000 (23:23 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
postlicyd/data/test.conf
postlicyd/data/test_ip_1 [new file with mode: 0644]
postlicyd/data/test_ip_2 [new file with mode: 0644]
postlicyd/data/testcase_1
postlicyd/data/testcase_2
postlicyd/data/testcase_3
postlicyd/data/testcase_4
postlicyd/data/testcase_5
postlicyd/data/testcase_6
postlicyd/data/testcase_7
postlicyd/data/testcase_8

index 7c88a75..9825ce1 100644 (file)
@@ -87,4 +87,17 @@ emails2 {
   on_fail = postfix:ok;
 }
 
+ips1 {
+  type = iplist;
+
+  file = nolock:1:data/test_ip_1;
+  file = nolock:1:data/test_ip_2;
+
+  soft_threshold = 1;
+  hard_threshold = 2;
+
+  on_hard_match = postfix:OK;
+  on_soft_match = postfix:OK;
+}
+
 recipient_filter = match1;
diff --git a/postlicyd/data/test_ip_1 b/postlicyd/data/test_ip_1
new file mode 100644 (file)
index 0000000..97fcd7a
--- /dev/null
@@ -0,0 +1,3 @@
+1.2.3.4
+2.3.4.5
+192.168.0.1
diff --git a/postlicyd/data/test_ip_2 b/postlicyd/data/test_ip_2
new file mode 100644 (file)
index 0000000..31ec607
--- /dev/null
@@ -0,0 +1,3 @@
+1.2.3.4
+1.2.3.5
+1.2.4.6
index 5aeb385..a562889 100644 (file)
@@ -29,3 +29,4 @@ hostnames1=fail
 hostnames2=fail
 emails1=fail
 emails2=fail
+ips1=hard_match
index 8fabe54..55fdab7 100644 (file)
@@ -29,3 +29,4 @@ hostnames1=soft_match
 hostnames2=hard_match
 emails1=soft_match
 emails2=hard_match
+ips1=hard_match
index b0a7d01..efe3754 100644 (file)
@@ -6,7 +6,7 @@ queue_id=8045F2AB23
 sender=contact@exemple.com
 recipient=contact@exemple.org
 recipient_count=0
-client_address=1.2.3.4
+client_address=1.2.3.1934
 client_name=kikoo.example.net
 reverse_client_name=example.net
 instance=123.456.7
@@ -29,3 +29,4 @@ hostnames1=fail
 hostnames2=hard_match
 emails1=fail
 emails2=fail
+ips1=error
index 3a9b547..beed42d 100644 (file)
@@ -6,7 +6,7 @@ queue_id=8045F2AB23
 sender=contact@exemple.com
 recipient=contact@exemple.org
 recipient_count=0
-client_address=1.2.3.4
+client_address=12::ef:ff
 client_name=kikoo.example.net
 reverse_client_name=example.net
 instance=123.456.7
@@ -29,3 +29,4 @@ hostnames1=fail
 hostnames2=hard_match
 emails1=fail
 emails2=fail
+ips1=error
index d964404..9b96b98 100644 (file)
@@ -6,7 +6,7 @@ queue_id=8045F2AB23
 sender=contact@exemple.com
 recipient=contact@exemple.org
 recipient_count=0
-client_address=1.2.3.4
+client_address=8.9.10.11
 client_name=kikoo.example.net
 reverse_client_name=example.net
 instance=123.456.7
@@ -21,11 +21,12 @@ encryption_protocol=TLSv1/SSLv3
 encryption_cipher=DHE-RSA-AES256-sha
 encryption_keysize=256
 etrn_domain=
-stress=ys
+stress=yEs
 
 match1=fail
-match2=fail
+match2=match
 hostnames1=fail
 hostnames2=hard_match
 emails1=fail
 emails2=fail
+ips1=fail
index 3431172..45213d7 100644 (file)
@@ -6,7 +6,7 @@ queue_id=8045F2AB23
 sender=contact@exemple.com
 recipient=contact@exemple.org
 recipient_count=0
-client_address=1.2.3.4
+client_address=2.3.4.5
 client_name=kikoo.example.net
 reverse_client_name=example.net
 instance=123.456.7
@@ -29,3 +29,4 @@ hostnames1=fail
 hostnames2=hard_match
 emails1=fail
 emails2=fail
+ips1=soft_match
index 871f09a..144c174 100644 (file)
@@ -29,3 +29,4 @@ hostnames1=fail
 hostnames2=hard_match
 emails1=fail
 emails2=fail
+ips1=hard_match
index c6b60b1..df463fc 100644 (file)
@@ -6,9 +6,8 @@ queue_id=8045F2AB23
 sender=contact@exemple.com
 recipient=contact@exemple.org
 recipient_count=0
-client_address=1.2.3.4
+client_address=1.2.3.5
 client_name=kikoo.example.net
-reverse_client_name=example.net
 instance=123.456.7
 sasl_method=plaineuh
 sasl_username=you
@@ -26,6 +25,7 @@ stress=yEs
 match1=fail
 match2=fail
 hostnames1=fail
-hostnames2=hard_match
+hostnames2=fail
 emails1=fail
 emails2=fail
+ips1=soft_match