]> source.dussan.org Git - rspamd.git/commitdiff
* Do not produce lua warning when message has no headers or has unresolved hostname
authorcebka@lenovo-laptop <cebka@lenovo-laptop>
Mon, 25 Jan 2010 12:35:38 +0000 (15:35 +0300)
committercebka@lenovo-laptop <cebka@lenovo-laptop>
Mon, 25 Jan 2010 12:35:38 +0000 (15:35 +0300)
src/plugins/lua/once_received.lua

index bf8e31462bf028eb6be71e190d64886e19ab16f3..d858314dd2738204d61359555c1ef638534b3cae 100644 (file)
@@ -14,9 +14,13 @@ function check_quantity_received (task)
                -- Strict checks
                if symbol_strict then
                        local r = recvh[1]
+            if not r then
+                return
+            end
                        -- Unresolved host
                        if not r['real_hostname'] or string.lower(r['real_hostname']) == 'unknown' or string.match(r['real_hostname'], '^%d+%.%d+%.%d+%.%d+$') then
                                task:insert_result(metric, symbol_strict, 1)
+                return
                        end
 
                        local i = true