From e1a3e8c4ae68a4b95f82eea3d5a3af0fa203a062 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Mon, 29 Sep 2008 22:51:07 +0200 Subject: [PATCH] Add a second testcase. Signed-off-by: Florent Bruneau --- postlicyd/data/test.conf | 12 ++++++------ postlicyd/data/testcase_1 | 10 +++++----- postlicyd/data/testcase_2 | 30 ++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 11 deletions(-) create mode 100644 postlicyd/data/testcase_2 diff --git a/postlicyd/data/test.conf b/postlicyd/data/test.conf index 7fe9548..3fc0503 100644 --- a/postlicyd/data/test.conf +++ b/postlicyd/data/test.conf @@ -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; diff --git a/postlicyd/data/testcase_1 b/postlicyd/data/testcase_1 index 32d54b3..e4801ce 100644 --- a/postlicyd/data/testcase_1 +++ b/postlicyd/data/testcase_1 @@ -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 index 0000000..cfad1a6 --- /dev/null +++ b/postlicyd/data/testcase_2 @@ -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 -- 2.20.1