diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-16 17:50:35 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-16 17:50:35 +0000 |
commit | 306a8e0c4cc8bbe26c0da5fa8a8339566118a421 (patch) | |
tree | d12b6bb7bd0fed9862bc5069ab75eb9d172e1824 /src/plugins/dkim_check.c | |
parent | 4a8f0846971bd5684f8fccd3763fbd5a64c6e501 (diff) | |
download | rspamd-306a8e0c4cc8bbe26c0da5fa8a8339566118a421.tar.gz rspamd-306a8e0c4cc8bbe26c0da5fa8a8339566118a421.zip |
[Feature] Write DKIM selector in dkim allow/reject symbols
Diffstat (limited to 'src/plugins/dkim_check.c')
-rw-r--r-- | src/plugins/dkim_check.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c index 72091fccb..f1a587e4a 100644 --- a/src/plugins/dkim_check.c +++ b/src/plugins/dkim_check.c @@ -1013,22 +1013,25 @@ dkim_module_check (struct dkim_check_result *res) if (symbol != NULL) { const gchar *domain = rspamd_dkim_get_domain (cur->ctx); + const gchar *selector = rspamd_dkim_get_selector (cur->ctx); gsize tracelen; gchar *tracebuf; - tracelen = strlen (domain) + 3; /* :<trace>\0 */ + tracelen = strlen (domain) + strlen (selector) + 4; tracebuf = rspamd_mempool_alloc (cur->task->task_pool, tracelen); rspamd_snprintf (tracebuf, tracelen, "%s:%s", domain, trace); rspamd_task_insert_result (cur->task, - symbol, - symbol_weight, - domain); - rspamd_task_insert_result (cur->task, "DKIM_TRACE", 0.0, tracebuf); + + rspamd_snprintf (tracebuf, tracelen, "%s:s=%s", domain, selector); + rspamd_task_insert_result (cur->task, + symbol, + symbol_weight, + tracebuf); } } } |