From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Subject: [PATCH] workaround --headers bug with spamc(1)
Date: Thu, 7 Dec 2023 23:32:14 +0000 [thread overview]
Message-ID: <20231207233214.M492093@dcvr> (raw)
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 <andrew.cooper3@citrix.com>
---
More C projects should take a hint from git and ban most
str*(3) functions :P
lib/PublicInbox/Spamcheck/Spamc.pm | 2 +-
scripts/dc-dlvr | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/PublicInbox/Spamcheck/Spamc.pm b/lib/PublicInbox/Spamcheck/Spamc.pm
index 798de218..b4f95e2b 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 935a8312..ef6033b9 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=$?
next reply other threads:[~2023-12-07 23:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 23:32 Eric Wong [this message]
2023-12-08 0:05 ` [PATCH] workaround --headers bug with spamc(1) Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231207233214.M492093@dcvr \
--to=e@80x24.org \
--cc=andrew.cooper3@citrix.com \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).