From: Eric Wong Date: Thu, 7 Dec 2023 23:32:14 +0000 (+0000) Subject: workaround --headers bug with spamc(1) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5515401eb4f51998c8444afee9e8f6db1e8d514;p=thirdparty%2Fpublic-inbox.git workaround --headers bug with spamc(1) As of SpamAssassin 4.0.0, spamc(1) corrupts messages with NUL in the body when the `--headers' switch is used. This increases transport costs, but most spamc/spamd setups are via local sockets, so it's unlikely to be significant. Link: https://bugs.debian.org/1057749 Reported-by: Andrew Cooper --- diff --git a/lib/PublicInbox/Spamcheck/Spamc.pm b/lib/PublicInbox/Spamcheck/Spamc.pm index 798de2185..b4f95e2ba 100644 --- a/lib/PublicInbox/Spamcheck/Spamc.pm +++ b/lib/PublicInbox/Spamcheck/Spamc.pm @@ -11,7 +11,7 @@ use Fcntl qw(SEEK_SET); sub new { my ($class) = @_; bless { - checkcmd => [qw(spamc -E --headers)], + checkcmd => [qw(spamc -E)], hamcmd => [qw(spamc -L ham)], spamcmd => [qw(spamc -L spam)], }, $class; diff --git a/scripts/dc-dlvr b/scripts/dc-dlvr index 935a8312d..ef6033b95 100755 --- a/scripts/dc-dlvr +++ b/scripts/dc-dlvr @@ -47,9 +47,9 @@ then rm_list="$rm_list $PREMSG" set +e mv -f $TMPMSG $PREMSG - $spamc -E --headers <$PREMSG >$TMPMSG + $spamc -E <$PREMSG >$TMPMSG else - $spamc -E --headers <$CDMSG >$TMPMSG + $spamc -E <$CDMSG >$TMPMSG fi err=$?