if ($mid =~ /\Q$regex\E/) {
$is_match = 1;
}
- if ($spam_ham eq 'spam') {
- $spam->add_spam($mid);
- } else {
- $spam->add_ham($mid);
+ if ($is_match) {
+ print STDERR "it's a match" if $DEBUG;
+ if ($spam_ham eq 'spam') {
+ $spam->add_spam($mid);
+ } else {
+ $spam->add_ham($mid);
+ }
}
},
$bug_num
);
+ $spam->save();
}
}
my ($msg_id) = record_regex($record,
qr/^Message-Id:\s+<(.+)>/mi);
next unless defined $msg_id;
+ print STDERR "examining $msg_id: " if $DEBUG;
if ($msg_id =~ /$config{email_domain}$/) {
- print STDERR "skipping $msg_id\n" if $DEBUG;
+ print STDERR "skipping\n" if $DEBUG;
next;
}
- print STDERR "examining $msg_id: " if $DEBUG;
if ($seen_msgids{$msg_id}) {
print STDERR "already seen\n" if $DEBUG;
next;
}
$seen_msgids{$msg_id}=1;
$sub->($bug_num,$record,$msg_id);
+ print STDERR "\n" if $DEBUG;
}
}