]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Try to fix SUSPICIOUS_RECIPS rule
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 2 Dec 2015 17:48:39 +0000 (17:48 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 2 Dec 2015 17:48:39 +0000 (17:48 +0000)
Issue: #437

src/libmime/mime_expressions.c

index ab685b2c0e8021e1ef540e5ee16012e2de8393b1..0bee87f4cf4cd414517b9460176477ab82255b77 100644 (file)
@@ -1342,11 +1342,21 @@ rspamd_recipients_distance (struct rspamd_task *task, GArray * args,
                                /* Common name part */
                                hits++;
                        }
+#if 0
+                       /* XXX: when we have a typical mail that is headed towards
+                        * several users within the same domain, then this rule
+                        * leads to a false-positive.
+                        * We actually need to match host against tld, but this is currently
+                        * too expensive.
+                        *
+                        * TODO: think about normal representation of InternetAddress shit
+                        */
                        else if (ar[i].addr && ar[j].addr &&
                                g_ascii_strcasecmp (ar[i].addr, ar[j].addr) == 0) {
                                /* Common address part, but different name */
                                hits++;
                        }
+#endif
                        total++;
                }
        }