user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* Re: [PATCH] workaround --headers bug with spamc(1)
  2023-12-07 23:32  6% [PATCH] workaround --headers bug with spamc(1) Eric Wong
@ 2023-12-08  0:05  7% ` Andrew Cooper
  0 siblings, 0 replies; 2+ results
From: Andrew Cooper @ 2023-12-08  0:05 UTC (permalink / raw)
  To: Eric Wong, meta; +Cc: Konstantin Ryabitsev

On 07/12/2023 11:32 pm, Eric Wong wrote:
> 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>

For the benefit of posterity, I reported
https://lore.kernel.org/xen-devel/2lyqb2u7tlcaig7nit3rnw5ftfupfemqmffr4ddsnolcrdojme@kmmlzigrzch3/
as a possible corruption in the archive, and within 3h it's been
debugged and worked around.  This is very much money-can't-buy levels of
help and support.

Thankyou,

~Andrew

^ permalink raw reply	[relevance 7%]

* [PATCH] workaround --headers bug with spamc(1)
@ 2023-12-07 23:32  6% Eric Wong
  2023-12-08  0:05  7% ` Andrew Cooper
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-12-07 23:32 UTC (permalink / raw)
  To: meta; +Cc: Andrew Cooper

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=$?
 

^ permalink raw reply related	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-12-07 23:32  6% [PATCH] workaround --headers bug with spamc(1) Eric Wong
2023-12-08  0:05  7% ` Andrew Cooper

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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).