]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Use multiple results from SURBL DNS reply
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 16 May 2018 12:56:25 +0000 (13:56 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 16 May 2018 12:56:25 +0000 (13:56 +0100)
src/plugins/surbl.c

index 62b96e75f3d81fc18b650944de08e0202683310c..17bc266880cdfe622a9632b82828e814fc5b14d8 100644 (file)
@@ -1416,16 +1416,17 @@ surbl_dns_callback (struct rdns_reply *reply, gpointer arg)
        struct rdns_reply_entry *elt;
 
        task = param->task;
-       /* If we have result from DNS server, this url exists in SURBL, so increase score */
        if (reply->code == RDNS_RC_NOERROR && reply->entries) {
                msg_debug_surbl ("<%s> domain [%s] is in surbl %s",
                                param->task->message_id,
                        param->host_resolve, param->suffix->suffix);
-               elt = reply->entries;
-               if (elt->type == RDNS_REQUEST_A) {
-                       process_dns_results (param->task, param->suffix,
-                               param->host_resolve, (guint32)elt->content.a.addr.s_addr,
-                               param->url);
+
+               DL_FOREACH (reply->entries, elt) {
+                       if (elt->type == RDNS_REQUEST_A) {
+                               process_dns_results (param->task, param->suffix,
+                                               param->host_resolve, (guint32) elt->content.a.addr.s_addr,
+                                               param->url);
+                       }
                }
        }
        else {