mirror of
https://github.com/rspamd/rspamd.git
synced 2024-08-18 14:10:22 +02:00
[Minor] Allow base32 encoding for emails request
This commit is contained in:
parent
3cdc26b154
commit
752043f91c
@ -63,7 +63,13 @@ local function check_email_rule(task, rule, addr)
|
||||
logger.debugm(N, task, "check %s on %s", email, rule['dnsbl'])
|
||||
|
||||
if rule['hash'] then
|
||||
to_resolve = hash.create_specific(rule['hash'], email):hex()
|
||||
local hkey = hash.create_specific(rule['hash'], email)
|
||||
|
||||
if rule['encoding'] == 'base32' then
|
||||
to_resolve = hkey:base32()
|
||||
else
|
||||
to_resolve = hkey:hex()
|
||||
end
|
||||
|
||||
if rule['hashlen'] and type(rule['hashlen']) == 'number' then
|
||||
if #to_resolve > rule['hashlen'] then
|
||||
|
Loading…
Reference in New Issue
Block a user