diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-05-19 17:18:43 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-05-19 17:18:43 +0100 |
commit | 13a13b60f155603393c5575ccfdeaa877cb613b6 (patch) | |
tree | 50d47f0d708d1b41dedb758928c7073f29c9a105 /src/libmime/mime_headers.c | |
parent | a102caecf7ab481bf4f3f5f4a233a5e64467e4d2 (diff) | |
download | rspamd-13a13b60f155603393c5575ccfdeaa877cb613b6.tar.gz rspamd-13a13b60f155603393c5575ccfdeaa877cb613b6.zip |
[Minor] Add `max_recipients` config knob
Diffstat (limited to 'src/libmime/mime_headers.c')
-rw-r--r-- | src/libmime/mime_headers.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c index 55d04d69a..786d43a6a 100644 --- a/src/libmime/mime_headers.c +++ b/src/libmime/mime_headers.c @@ -20,6 +20,7 @@ #include "contrib/uthash/utlist.h" #include "libserver/mempool_vars_internal.h" #include "libserver/url.h" +#include "libserver/cfg_file.h" #include "libutil/util.h" #include <unicode/utf8.h> @@ -62,25 +63,25 @@ rspamd_mime_header_check_special (struct rspamd_task *task, case 0x76F31A09F4352521ULL: /* to */ MESSAGE_FIELD (task, rcpt_mime) = rspamd_email_address_from_mime (task->task_pool, rh->decoded, strlen (rh->decoded), - MESSAGE_FIELD (task, rcpt_mime), -1); + MESSAGE_FIELD (task, rcpt_mime), task->cfg->max_recipients); rh->flags |= RSPAMD_HEADER_TO|RSPAMD_HEADER_RCPT|RSPAMD_HEADER_UNIQUE; break; case 0x7EB117C1480B76ULL: /* cc */ MESSAGE_FIELD (task, rcpt_mime) = rspamd_email_address_from_mime (task->task_pool, rh->decoded, strlen (rh->decoded), - MESSAGE_FIELD (task, rcpt_mime), -1); + MESSAGE_FIELD (task, rcpt_mime), task->cfg->max_recipients); rh->flags |= RSPAMD_HEADER_CC|RSPAMD_HEADER_RCPT|RSPAMD_HEADER_UNIQUE; break; case 0xE4923E11C4989C8DULL: /* bcc */ MESSAGE_FIELD (task, rcpt_mime) = rspamd_email_address_from_mime (task->task_pool, rh->decoded, strlen (rh->decoded), - MESSAGE_FIELD (task, rcpt_mime), -1); + MESSAGE_FIELD (task, rcpt_mime), task->cfg->max_recipients); rh->flags |= RSPAMD_HEADER_BCC|RSPAMD_HEADER_RCPT|RSPAMD_HEADER_UNIQUE; break; case 0x41E1985EDC1CBDE4ULL: /* from */ MESSAGE_FIELD (task, from_mime) = rspamd_email_address_from_mime (task->task_pool, rh->decoded, strlen (rh->decoded), - MESSAGE_FIELD (task, from_mime), -1); + MESSAGE_FIELD (task, from_mime), task->cfg->max_recipients); rh->flags |= RSPAMD_HEADER_FROM|RSPAMD_HEADER_SENDER|RSPAMD_HEADER_UNIQUE; break; case 0x43A558FC7C240226ULL: /* message-id */ { @@ -129,7 +130,7 @@ rspamd_mime_header_check_special (struct rspamd_task *task, case 0xEE4AA2EAAC61D6F4ULL: /* return-path */ if (task->from_envelope == NULL) { task->from_envelope = rspamd_email_address_from_smtp (rh->decoded, - strlen (rh->decoded), -1); + strlen (rh->decoded)); } rh->flags = RSPAMD_HEADER_RETURN_PATH|RSPAMD_HEADER_UNIQUE; break; |