Browse Source

test uribll in image

pull/3022/head
korgoth1 6 years ago
parent
commit
a8f11e58cb
  1. BIN
      test/functional/cases/210_clickhouse/clickhouse.pyc
  2. 8
      test/functional/cases/340_surbl.robot
  3. 14
      test/functional/configs/surbl.conf
  4. 5
      test/functional/messages/urlimage.eml
  5. BIN
      test/functional/util/dummy_killer.pyc

BIN
test/functional/cases/210_clickhouse/clickhouse.pyc

8
test/functional/cases/340_surbl.robot

@ -52,6 +52,14 @@ SURBL Example.ru ZEN domain
Should Not Contain ${result.stdout} DBL_PHISH (
Should Not Contain ${result.stdout} URIBL_BLACK (
SURBL Example.com domain image false
${result} = Scan Message With Rspamc ${TESTDIR}/messages/urlimage.eml
Should Contain ${result.stdout} RSPAMD_URIBL_IMAGES
Should Not Contain ${result.stdout} DBL_SPAM (
Should Not Contain ${result.stdout} RSPAMD_URIBL (
Should Not Contain ${result.stdout} DBL_PHISH (
Should Not Contain ${result.stdout} URIBL_BLACK (
*** Keywords ***
Surbl Setup
${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/surbl.conf

14
test/functional/configs/surbl.conf

@ -5,6 +5,7 @@ surbl {
suffix = "test.uribl";
check_dkim = true;
check_emails = true;
images = false;
process_script =<<EOD
function(url, suffix)
local cr = require "rspamd_cryptobox_hash"
@ -50,5 +51,18 @@ EOD;
URIBL_DROP = "127.0.0.9";
}
}
"RSPAMD_URIBL_IMAGES" {
suffix = "test.uribl";
check_dkim = true;
check_emails = true;
images = true;
process_script =<<EOD
function(url, suffix)
local cr = require "rspamd_cryptobox_hash"
local h = cr.create(url):base32():sub(1, 32)
return string.format("%s.%s", h, suffix)
end
EOD;
}
}
}

5
test/functional/messages/urlimage.eml

@ -0,0 +1,5 @@
Content-Type: text/html
helo
<body text="#000000" bgcolor="#FFFFFF">
<p><img src="https://example.com" alt=""moz-do-not-send="false" width="326" height="326" border="0"></a></p>

BIN
test/functional/util/dummy_killer.pyc

Loading…
Cancel
Save