]> source.dussan.org Git - rspamd.git/commitdiff
add HAS_ONION_URI rule
authorheraklit256 <heraklit256@users.noreply.github.com>
Sat, 13 Oct 2018 18:46:56 +0000 (20:46 +0200)
committerheraklit256 <heraklit256@users.noreply.github.com>
Sat, 13 Oct 2018 18:46:56 +0000 (20:46 +0200)
rules/regexp/misc.lua

index f63526a8e954cbfd18238f51b06c0608b0394ee0..b9e1b0e6d0c501bf775d3a153c3dda5c87f9c3df 100644 (file)
@@ -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'
+}