From b2dd82531c75b396dfffd1814bb33987f18adfe4 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 14 Nov 2015 14:17:07 +0000 Subject: [PATCH] Allow logging of recipients for a message --- src/libserver/cfg_file.h | 4 ++++ src/libserver/cfg_utils.c | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index 6e87acafe..c70ecddae 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -180,6 +180,10 @@ enum rspamd_log_format_type { RSPAMD_LOG_DNS_REQ, RSPAMD_LOG_SMTP_FROM, RSPAMD_LOG_MIME_FROM, + RSPAMD_LOG_SMTP_RCPT, + RSPAMD_LOG_MIME_RCPT, + RSPAMD_LOG_SMTP_RCPTS, + RSPAMD_LOG_MIME_RCPTS, RSPAMD_LOG_TIME_REAL, RSPAMD_LOG_TIME_VIRTUAL, RSPAMD_LOG_LUA diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index acdf8979e..b85534dd7 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -346,6 +346,18 @@ rspamd_config_process_var (struct rspamd_config *cfg, const rspamd_ftok_t *var, else if (rspamd_ftok_cstr_equal (&tok, "mime_from", TRUE)) { type = RSPAMD_LOG_MIME_FROM; } + else if (rspamd_ftok_cstr_equal (&tok, "smtp_rcpt", TRUE)) { + type = RSPAMD_LOG_SMTP_RCPT; + } + else if (rspamd_ftok_cstr_equal (&tok, "mime_rcpt", TRUE)) { + type = RSPAMD_LOG_MIME_RCPT; + } + else if (rspamd_ftok_cstr_equal (&tok, "smtp_rcpts", TRUE)) { + type = RSPAMD_LOG_SMTP_RCPTS; + } + else if (rspamd_ftok_cstr_equal (&tok, "mime_rcpts", TRUE)) { + type = RSPAMD_LOG_MIME_RCPTS; + } else if (rspamd_ftok_cstr_equal (&tok, "time_real", TRUE)) { type = RSPAMD_LOG_TIME_REAL; } -- 2.39.5