From 2bbb76efdb6fa105d7a9dd9351048ac24c0e4af4 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 21 Jul 2015 15:03:31 +0100 Subject: [PATCH] Add workaround for surbl DNS flood. --- src/plugins/surbl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c index 66cc2da2b..10fa225ca 100644 --- a/src/plugins/surbl.c +++ b/src/plugins/surbl.c @@ -827,6 +827,10 @@ make_surbl_requests (struct rspamd_url *url, struct rspamd_task *task, f.begin = url->host; f.len = url->hostlen; + if (task->dns_requests >= task->cfg->dns_max_requests) { + return; + } + if ((surbl_req = format_surbl_request (task->task_pool, &f, suffix, TRUE, &err, forced, tree, url)) != NULL) { param = -- 2.39.5