From c8e7d65b3970f106152bbcfbc8d5a2cf56a97f5e Mon Sep 17 00:00:00 2001 From: korgoth1 Date: Wed, 11 Mar 2020 22:45:07 +0300 Subject: [PATCH] [Test] URL compose map --- test/functional/cases/300_rbl.robot | 6 +++--- test/functional/configs/plugins.conf | 9 ++------- test/functional/configs/rbl.conf | 2 +- test/functional/messages/url14.eml | 2 +- test/functional/messages/url15.eml | 3 +-- test/functional/messages/url16.eml | 5 +++-- 6 files changed, 11 insertions(+), 16 deletions(-) diff --git a/test/functional/cases/300_rbl.robot b/test/functional/cases/300_rbl.robot index 525786eb74..ef858558c9 100644 --- a/test/functional/cases/300_rbl.robot +++ b/test/functional/cases/300_rbl.robot @@ -38,16 +38,16 @@ RBL FROM HIT WL EMAILBL Compose Map 1 ${result} = Scan Message With Rspamc ${TESTDIR}/messages/url14.eml - Should Contain ${result.stdout} RSPAMD_EMAILBL (0.00)[user.dirty.sanchez.com:email] + Should Contain ${result.stdout} RSPAMD_EMAILBL (0.00)[dirty.sanchez.com:email] EMAILBL Compose Map 2 ${result} = Scan Message With Rspamc ${TESTDIR}/messages/url15.eml - Should Contain ${result.stdout} RSPAMD_EMAILBL (0.00)[4.very.dirty.sanchez.com:email] + Should Contain ${result.stdout} RSPAMD_EMAILBL (0.00)[very.dirty.sanchez.com:email] EMAILBL Compose Map 3 ${result} = Scan Message With Rspamc ${TESTDIR}/messages/url16.eml Should Contain ${result.stdout} RSPAMD_EMAILBL (0.00)[41.black.sanchez.com:email] - + *** Keywords *** Rbl Setup diff --git a/test/functional/configs/plugins.conf b/test/functional/configs/plugins.conf index 861b865451..e74ddd73d2 100644 --- a/test/functional/configs/plugins.conf +++ b/test/functional/configs/plugins.conf @@ -691,17 +691,12 @@ options = { replies = ["127.0.0.2"]; }, { - name = "user.dirty.sanchez.com.test8.uribl"; + name = "dirty.sanchez.com.test8.uribl"; type = a; replies = ["127.0.0.2"]; }, { - name = "admin.dirty.sanchez.com.test8.uribl"; - type = a; - replies = ["127.0.0.2"]; - }, - { - name = "4.very.dirty.sanchez.com.test8.uribl"; + name = "very.dirty.sanchez.com.test8.uribl"; type = a; replies = ["127.0.0.2"]; }, diff --git a/test/functional/configs/rbl.conf b/test/functional/configs/rbl.conf index e4a57576ec..da5c59b53c 100644 --- a/test/functional/configs/rbl.conf +++ b/test/functional/configs/rbl.conf @@ -35,7 +35,7 @@ rbl { rbl = "test8.uribl"; url_compose_map = "${TESTDIR}/configs/maps/url_compose_map_for_mails.list"; emails = true; - emails_delimiter = "."; + emails_domainonly = true returncodes = { RSPAMD_EMAILBL = "127.0.0.2"; } diff --git a/test/functional/messages/url14.eml b/test/functional/messages/url14.eml index 42653a6141..32632da4a2 100644 --- a/test/functional/messages/url14.eml +++ b/test/functional/messages/url14.eml @@ -1,4 +1,4 @@ Content-Type: text/plain user@dirty.sanchez.com -admin@dirty.sanchez.com \ No newline at end of file +user@admin.dirty.sanchez.com \ No newline at end of file diff --git a/test/functional/messages/url15.eml b/test/functional/messages/url15.eml index a55521e312..1240979af5 100644 --- a/test/functional/messages/url15.eml +++ b/test/functional/messages/url15.eml @@ -1,4 +1,3 @@ Content-Type: text/plain -4@very.dirty.sanchez.com -admin@dirty.sanchez.com \ No newline at end of file +4@very.dirty.sanchez.com \ No newline at end of file diff --git a/test/functional/messages/url16.eml b/test/functional/messages/url16.eml index 49bd398aab..0dbe8079ab 100644 --- a/test/functional/messages/url16.eml +++ b/test/functional/messages/url16.eml @@ -1,4 +1,5 @@ Content-Type: text/plain -41@black.sanchez.com -black@sanchez.com \ No newline at end of file +test@admin.dirty.sanchez.com +admin@41.black.sanchez.com +admin@black.sanchez.com \ No newline at end of file -- 2.47.3