diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-10 10:55:28 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-10 10:55:28 +0100 |
commit | 38a6ceb5fff743c2233b79920ee2d1ff7a6a0cdc (patch) | |
tree | 4f059a53489eaa3e56c3345ee63a9bfb36db6d42 | |
parent | 259cab02423faae0435695bc39e169b696b3d1fd (diff) | |
download | rspamd-38a6ceb5fff743c2233b79920ee2d1ff7a6a0cdc.tar.gz rspamd-38a6ceb5fff743c2233b79920ee2d1ff7a6a0cdc.zip |
Change separators to commas to avoid issues with ipv6.
-rw-r--r-- | doc/markdown/modules/dmarc.md | 2 | ||||
-rw-r--r-- | src/plugins/lua/dmarc.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/markdown/modules/dmarc.md b/doc/markdown/modules/dmarc.md index 191e1c216..c69fa3015 100644 --- a/doc/markdown/modules/dmarc.md +++ b/doc/markdown/modules/dmarc.md @@ -36,7 +36,7 @@ When you have this module enabled, it also adds symbols: When a message violates DMARC policy, rspamd adds the following information to `redis` server: - unixtime:ip:spf_result:dkim_result + unixtime,ip,spf_result,dkim_result where results are `true` or `false` meaning allow and reject values accordingly. Unixtime and IP are inserted in text form. Keys are therefore `lists` in redis terminology. diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index d965cefc3..ee24794dc 100644 --- a/src/plugins/lua/dmarc.lua +++ b/src/plugins/lua/dmarc.lua @@ -56,7 +56,7 @@ local function dmarc_report(task, spf_ok, dkim_ok) if not ip:is_valid() then return nil end - local res = string.format('%d:%s:%s:%s', task:get_date(0), + local res = string.format('%d,%s,%s,%s', task:get_date(0), ip:to_string(), tostring(spf_ok), tostring(dkim_ok)) return res |