]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Multimap: Received IP filters with Redis
authorAndrew Lewis <nerf@judo.za.org>
Tue, 9 May 2017 12:19:55 +0000 (14:19 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Tue, 9 May 2017 12:58:51 +0000 (14:58 +0200)
 - Issue: #1623
 - Reported by: @andryyy

src/plugins/lua/multimap.lua

index c859198811303a00618de3327db67d7aafcc98c5..f5f5edaca1d1654743f4345c7529acfb9f71db81 100644 (file)
@@ -369,7 +369,8 @@ local function multimap_callback(task, rule)
       ret = r['cdb']:lookup(srch)
     elseif r['redis_key'] then
       local srch = value
-      if r['type'] == 'ip' then
+      if r['type'] == 'ip' or (r['type'] == 'received' and
+        (r['filter'] == 'real_ip' or r['filter'] == 'from_ip' or not r['filter'])) then
         srch = value:to_string()
       end
       ret = rspamd_redis_make_request(task,