gboolean
rspamd_parts_distance (struct worker_task * task, GList * args, void *unused)
{
- int threshold;
+ int threshold, diff;
struct mime_text_part *p1, *p2;
GList *cur;
struct expression_argument *arg;
return FALSE;
}
p2 = cur->data;
- if (fuzzy_compare_hashes (p1->fuzzy, p2->fuzzy) <= threshold) {
+ diff = fuzzy_compare_hashes (p1->fuzzy, p2->fuzzy);
+ debug_task ("got likeliness between parts of %d%%, threshold is %d%%", diff, threshold);
+ if (diff <= threshold) {
return TRUE;
}
}
else {
r = rspamd_snprintf (outbuf, sizeof (outbuf), "Metric: default; False; 0 / %.2f" CRLF, ms);
}
+ r += rspamd_snprintf (outbuf + r, sizeof (outbuf) - r, "Action: %s" CRLF, str_action_metric (METRIC_ACTION_NOACTION));
}
if (!task->is_skipped) {
- cd->log_offset += rspamd_snprintf (cd->log_buf + cd->log_offset, cd->log_size - cd->log_offset, "(%s: F: [0/%.2f/%.2f] [", "default", ms, rs);
+ cd->log_offset += rspamd_snprintf (cd->log_buf + cd->log_offset, cd->log_size - cd->log_offset, "(%s: F (no action): [0/%.2f/%.2f] [", "default", ms, rs);
}
else {
cd->log_offset += rspamd_snprintf (cd->log_buf + cd->log_offset, cd->log_size - cd->log_offset, "(%s: S: [0/%.2f/%.2f] [", "default", ms, rs);