From: Vsevolod Stakhov Date: Tue, 21 Jul 2015 14:03:31 +0000 (+0100) Subject: Add workaround for surbl DNS flood. X-Git-Tag: 0.9.10~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2bbb76efdb6fa105d7a9dd9351048ac24c0e4af4;p=rspamd.git Add workaround for surbl DNS flood. --- 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 =