summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-07-08 19:01:57 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-07-08 19:01:57 +0400
commit19baadf6a0e6b2554de67b674a2c6f30efda13bb (patch)
tree6526075d6cfa9f2a4899e2dc44ddf5e0c79a240f
parentb1709c2aef88729a3d5ce3d1a156ed269afdfe60 (diff)
downloadrspamd-19baadf6a0e6b2554de67b674a2c6f30efda13bb.tar.gz
rspamd-19baadf6a0e6b2554de67b674a2c6f30efda13bb.zip
* Fix distance calculation for common recipients
-rw-r--r--conf/headers.inc2
-rw-r--r--src/expressions.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/conf/headers.inc b/conf/headers.inc
index a7bf9ccd9..d7c2d2f4d 100644
--- a/conf/headers.inc
+++ b/conf/headers.inc
@@ -76,7 +76,7 @@ $__YAHOO_BULK="Received=/from \[\S+\] by \S+\.(?:groups|scd|dcn)\.yahoo\.com wit
$__ANY_OUTLOOK_MUA="X-Mailer=/^Microsoft Outlook\b/H";
$MIME_HTML_ONLY="has_only_html_part()";
$FORGED_OUTLOOK_HTML="!${__YAHOO_BULK} & ${__ANY_OUTLOOK_MUA} & ${MIME_HTML_ONLY}";
-$SUSPICIOUS_RECIPS="compare_recipients_distance(0.65)";
+$SUSPICIOUS_RECIPS="compare_recipients_distance(0.85)";
$SORTED_RECIPS="is_recipients_sorted()";
$TRACKER_ID="/^[a-z0-9]{6,24}[-_a-z0-9]{2,36}[a-z0-9]{6,24}\s*\z/isPr";
$__FROM_ENCODED_B64="From=/\=\?\S+\?B\?/iX";
diff --git a/src/expressions.c b/src/expressions.c
index 73db179fe..13b426ec7 100644
--- a/src/expressions.c
+++ b/src/expressions.c
@@ -1202,7 +1202,7 @@ rspamd_recipients_distance (struct worker_task *task, GList *args)
}
}
- if ((double)total / (double)hits >= threshold) {
+ if ((double)(hits * num / 2.) / (double)total >= threshold) {
return TRUE;
}