From b402eacc8f657e94c53e517604d341e886e2140d Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sun, 22 Mar 2020 13:14:17 -0700 Subject: [PATCH] debugs-spam: output all of folded X-Spam headers --- bin/debbugs-spam | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.39.2