diff options
author | korgoth1 <vladislav.stakhov@gmail.com> | 2019-09-22 22:07:25 +0300 |
---|---|---|
committer | korgoth1 <vladislav.stakhov@gmail.com> | 2019-09-22 22:07:25 +0300 |
commit | 9a77fefe6512423df49bc47292994b0ed13cac4c (patch) | |
tree | b898c19406a3ba568b1bbd235a7a030edf0736fa | |
parent | de0d6076198efa2c4bf7d5cf0d11b23f0664d0c5 (diff) | |
download | rspamd-9a77fefe6512423df49bc47292994b0ed13cac4c.tar.gz rspamd-9a77fefe6512423df49bc47292994b0ed13cac4c.zip |
[Test] EMAIL BL
-rw-r--r-- | test/functional/cases/340_surbl.robot | 16 | ||||
-rw-r--r-- | test/functional/configs/plugins.conf | 10 | ||||
-rw-r--r-- | test/functional/configs/surbl.conf | 16 | ||||
-rw-r--r-- | test/functional/messages/emailbltext.eml | 4 | ||||
-rw-r--r-- | test/functional/messages/replyto.eml | 5 | ||||
-rw-r--r-- | test/functional/messages/replyto2.eml | 5 |
6 files changed, 56 insertions, 0 deletions
diff --git a/test/functional/cases/340_surbl.robot b/test/functional/cases/340_surbl.robot index 4e1558ecd..87d02dd29 100644 --- a/test/functional/cases/340_surbl.robot +++ b/test/functional/cases/340_surbl.robot @@ -98,6 +98,22 @@ WHITELIST Should Not Contain ${result.stdout} DBL_SPAM ( Should Not Contain ${result.stdout} RSPAMD_URIBL_IMAGES ( +EMAILBL full adress & domain only + ${result} = Scan Message With Rspamc ${TESTDIR}/messages/emailbltext.eml + Should Contain ${result.stdout} RSPAMD_EMAILBL_FULL ( + Should Contain ${result.stdout} RSPAMD_EMAILBL_DOMAINONLY ( + +EMAILBL REPLY TO full adress + ${result} = Scan Message With Rspamc ${TESTDIR}/messages/replyto.eml + Should Contain ${result.stdout} RSPAMD_EMAILBL_FULL ( + Should Not Contain ${result.stdout} RSPAMD_EMAILBL_DOMAINONLY ( + +EMAILBL REPLY TO domain only + ${result} = Scan Message With Rspamc ${TESTDIR}/messages/replyto2.eml + Should Contain ${result.stdout} RSPAMD_EMAILBL_DOMAINONLY ( + Should Not Contain ${result.stdout} RSPAMD_EMAILBL_FULL ( + + *** Keywords *** Surbl Setup ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/surbl.conf diff --git a/test/functional/configs/plugins.conf b/test/functional/configs/plugins.conf index cb5d50609..bb4b97e1d 100644 --- a/test/functional/configs/plugins.conf +++ b/test/functional/configs/plugins.conf @@ -540,6 +540,16 @@ options = { replies = ["127.0.0.2"]; }, { + name = "user.emailbl.com.test5.uribl"; + type = a; + replies = ["127.0.0.2"]; + }, + { + name = "baddomain.com.test6.uribl"; + type = a; + replies = ["127.0.0.2"]; + }, + { name = "example.com.test2.uribl"; type = a; replies = ["127.0.1.2"]; diff --git a/test/functional/configs/surbl.conf b/test/functional/configs/surbl.conf index a4f22bb9f..823aec25c 100644 --- a/test/functional/configs/surbl.conf +++ b/test/functional/configs/surbl.conf @@ -64,5 +64,21 @@ EOD; end EOD; } + "RSPAMD_EMAILBL_FULL" { + suffix = "test5.uribl"; + check_emails = true; + emails_domainonly = false; + urls = false; + replyto = true; + images = false; + } + "RSPAMD_EMAILBL_DOMAINONLY" { + suffix = "test6.uribl"; + check_emails = true; + emails_domainonly = true; + urls = false; + replyto = true; + images = false; + } } }
\ No newline at end of file diff --git a/test/functional/messages/emailbltext.eml b/test/functional/messages/emailbltext.eml new file mode 100644 index 000000000..6ae877d59 --- /dev/null +++ b/test/functional/messages/emailbltext.eml @@ -0,0 +1,4 @@ +Content-Type: text/plain + +user@emailbl.com +user@baddomain.com
\ No newline at end of file diff --git a/test/functional/messages/replyto.eml b/test/functional/messages/replyto.eml new file mode 100644 index 000000000..234bc59e0 --- /dev/null +++ b/test/functional/messages/replyto.eml @@ -0,0 +1,5 @@ +Reply-to: user@emailbl.com +From: xxx@abrakadabra.com +Content-Type: text/plain + +salkdmaslkd
\ No newline at end of file diff --git a/test/functional/messages/replyto2.eml b/test/functional/messages/replyto2.eml new file mode 100644 index 000000000..2813f03cd --- /dev/null +++ b/test/functional/messages/replyto2.eml @@ -0,0 +1,5 @@ +Reply-to: user@baddomain.com +From: xxx@abrakadabra.com +Content-Type: text/plain + +salkdmaslkd
\ No newline at end of file |