From: Don Armstrong Date: Sun, 22 Mar 2020 20:14:17 +0000 (-0700) Subject: debugs-spam: output all of folded X-Spam headers X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=b402eacc8f657e94c53e517604d341e886e2140d debugs-spam: output all of folded X-Spam headers --- 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;