diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-07-03 08:52:31 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-07-03 08:52:31 +0100 |
commit | 6a2fcfc30cb8b0051c10f6e5794565e3176dbe61 (patch) | |
tree | 8b4c3d867c6b53edc8e892b9c6c31cf788ec83e7 /src/libserver/spf.c | |
parent | 6cd82ee7c36488ee629f062e1afa2f9219cef1b1 (diff) | |
download | rspamd-6a2fcfc30cb8b0051c10f6e5794565e3176dbe61.tar.gz rspamd-6a2fcfc30cb8b0051c10f6e5794565e3176dbe61.zip |
[Fix] Do not cache SPF records with macros
Diffstat (limited to 'src/libserver/spf.c')
-rw-r--r-- | src/libserver/spf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libserver/spf.c b/src/libserver/spf.c index e8aa9cbab..a3a1b95f8 100644 --- a/src/libserver/spf.c +++ b/src/libserver/spf.c @@ -1580,6 +1580,12 @@ expand_spf_macro (struct spf_record *rec, struct spf_resolved_element *resolved, new = rspamd_mempool_alloc (task->task_pool, len + 1); + /* Reduce TTL to avoid caching of records with macros */ + if (rec->ttl != 0) { + rec->ttl = 0; + msg_debug_spf ("disable SPF caching as there is macro expansion"); + } + c = new; p = begin; state = 0; |