summaryrefslogtreecommitdiffstats
path: root/rules/misc.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-11 13:27:17 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-11 13:27:17 +0000
commit0cb2840c4bc897e6b60435a3dc785dd461b07787 (patch)
tree3174fef790cd1f4c29db8424c40d1b4e6e8ad186 /rules/misc.lua
parent256b3305e80f0bc6cbbc34e58d68ca1555719ab9 (diff)
downloadrspamd-0cb2840c4bc897e6b60435a3dc785dd461b07787.tar.gz
rspamd-0cb2840c4bc897e6b60435a3dc785dd461b07787.zip
[Minor] Use modern syntax in rules registration
Diffstat (limited to 'rules/misc.lua')
-rw-r--r--rules/misc.lua40
1 files changed, 20 insertions, 20 deletions
diff --git a/rules/misc.lua b/rules/misc.lua
index 30a3d57ba..59c8ec4a7 100644
--- a/rules/misc.lua
+++ b/rules/misc.lua
@@ -191,26 +191,26 @@ rspamd_config.ENVFROM_VERP = {
}
rspamd_config.RCVD_TLS_ALL = {
- callback = function (task)
- local rcvds = task:get_header_full('Received')
- if not rcvds then return false end
- local count = 0
- local encrypted = 0
- for _, rcvd in ipairs(rcvds) do
- count = count + 1
- local r = rcvd['decoded']:lower()
- local with = r:match('%swith%s+(e?smtps?a?)')
- if with and with:match('esmtps') then
- encrypted = encrypted + 1
- end
- end
- if (count > 0 and count == encrypted) then
- return true
- end
- end,
- score = 0.0,
- description = "All hops used encrypted transports",
- group = "encryption"
+ callback = function (task)
+ local rcvds = task:get_header_full('Received')
+ if not rcvds then return false end
+ local count = 0
+ local encrypted = 0
+ for _, rcvd in ipairs(rcvds) do
+ count = count + 1
+ local r = rcvd['decoded']:lower()
+ local with = r:match('%swith%s+(e?smtps?a?)')
+ if with and with:match('esmtps') then
+ encrypted = encrypted + 1
+ end
+ end
+ if (count > 0 and count == encrypted) then
+ return true
+ end
+ end,
+ score = 0.0,
+ description = "All hops used encrypted transports",
+ group = "encryption"
}
rspamd_config.RCVD_HELO_USER = {