X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bin%2Fdebbugs-spam;h=1c44290543420946f53db6942b0c4de3a50961a6;hb=b402eacc8f657e94c53e517604d341e886e2140d;hp=09077e0acccac2a0c842caf0df07b6cea79ab520;hpb=ea162515d6f096215237c46b55f9d5d3e370d02f;p=debbugs.git diff --git a/bin/debbugs-spam b/bin/debbugs-spam index 09077e0..1c44290 100755 --- a/bin/debbugs-spam +++ b/bin/debbugs-spam @@ -370,13 +370,17 @@ sub spam_score { if ($exit_code) { $is_spam = 1; } + my $in_spam_header = 0; while (<$spamc_out>) { - if (/^X-Spam/) { + if (/^X-Spam/ or (/^\s+/ and $in_spam_header)) { + $in_spam_header = 1; $report .= $_; if (/^X-Spam-Status: (Yes|No), score=(-?[\d\.]+) required=(-?[\d\.]+)/) { $threshold = $3; $score = $2; } + } else { + $in_spam_header = 0; } if (/^\s*$/) { last;