Add a second testcase.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Mon, 29 Sep 2008 20:51:07 +0000 (22:51 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Mon, 29 Sep 2008 20:51:07 +0000 (22:51 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
postlicyd/data/test.conf
postlicyd/data/testcase_1
postlicyd/data/testcase_2 [new file with mode: 0644]

index 7fe9548..3fc0503 100644 (file)
@@ -1,4 +1,4 @@
-filter1 {
+match1 {
   type = match;
 
   condition = stress #=;
@@ -6,7 +6,7 @@ filter1 {
   on_fail   = postfix:OK;
 }
 
-filter2 {
+hostnames1 {
   type = strlist;
 
   fields = helo_name,client_name;
@@ -22,7 +22,7 @@ filter2 {
   on_fail = postfix:OK;
 }
 
-filter3 {
+hostnames2 {
   type = strlist;
 
   fields = helo_name,client_name,reverse_client_name;
@@ -38,7 +38,7 @@ filter3 {
   on_fail = postfix:OK;
 }
 
-filter4 {
+emails1 {
   type = strlist;
 
   fields = sender;
@@ -54,7 +54,7 @@ filter4 {
   on_fail = postfix:ok;
 }
 
-filter5 {
+emails2 {
   type = strlist;
 
   fields = sender,recipient;
@@ -70,4 +70,4 @@ filter5 {
   on_fail = postfix:ok;
 }
 
-recipient_filter = filter1;
+recipient_filter = match1;
index 32d54b3..e4801ce 100644 (file)
@@ -23,8 +23,8 @@ encryption_keysize=256
 etrn_domain=
 stress=
 
-filter1=match
-filter2=fail
-filter3=fail
-filter4=fail
-filter5=fail
+match1=match
+hostnames1=fail
+hostnames2=fail
+emails1=fail
+emails2=fail
diff --git a/postlicyd/data/testcase_2 b/postlicyd/data/testcase_2
new file mode 100644 (file)
index 0000000..cfad1a6
--- /dev/null
@@ -0,0 +1,30 @@
+request=smtpd_access_policy
+protocol_state=RCPT
+protocol_name=SMTP
+helo_name=example.org
+queue_id=8045F2AB23
+sender=contact@example.com
+recipient=contact@example.org
+recipient_count=0
+client_address=1.2.3.4
+client_name=kikoo.example.net
+reverse_client_name=foobar.example.org
+instance=123.456.7
+sasl_method=plain
+sasl_username=you
+sasl_sender=
+size=12345
+ccert_subject=solaris9.porcupine.org
+ccert_issuer=Wietse+20Venema
+ccert_fingerprint=C2:9D:F4:87:71:73:73:D9:18:E7:C2:F3:C1:DA:6E:04
+encryption_protocol=TLSv1/SSLv3
+encryption_cipher=DHE-RSA-AES256-SHA
+encryption_keysize=256
+etrn_domain=
+stress=yes
+
+match1=fail
+hostnames1=soft_match
+hostnames2=hard_match
+emails1=soft_match
+emails2=hard_match