aboutsummaryrefslogtreecommitdiffstats
path: root/rules/regexp
diff options
context:
space:
mode:
authorheraklit256 <heraklit256@users.noreply.github.com>2018-10-13 20:46:56 +0200
committerheraklit256 <heraklit256@users.noreply.github.com>2018-10-13 20:46:56 +0200
commit5b3fe0de0f28bfae05340dc9c9209adc37c8c499 (patch)
tree2949fffeaf6f2ff05ec146c181efe57c69532eb4 /rules/regexp
parent5f4617948c64483dfb648b5bfe784f8c84dd87ea (diff)
downloadrspamd-5b3fe0de0f28bfae05340dc9c9209adc37c8c499.tar.gz
rspamd-5b3fe0de0f28bfae05340dc9c9209adc37c8c499.zip
add HAS_ONION_URI rule
Diffstat (limited to 'rules/regexp')
-rw-r--r--rules/regexp/misc.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/rules/regexp/misc.lua b/rules/regexp/misc.lua
index f63526a8e..b9e1b0e6d 100644
--- a/rules/regexp/misc.lua
+++ b/rules/regexp/misc.lua
@@ -51,3 +51,12 @@ reconf['INTRODUCTION'] = {
group = 'scams'
}
+-- Message contains a link to a .onion URI (Tor hidden service)
+local onion_uri_v2 = '/[a-z0-9]{16}\\.onion?/{url}i'
+local onion_uri_v3 = '/[a-z0-9]{56}\\.onion?/{url}i'
+reconf['HAS_ONION_URI'] = {
+ re = string.format('(%s | %s)', onion_uri_v2, onion_uri_v3),
+ description = 'Contains .onion hidden service URI',
+ score = 0.0,
+ group = 'experimental'
+}