Hi, > I think this would be better addressed by apt-listchanges itself, and I > filed a report for that: #1020858
The cause of this problem is the maximum of 998 chars in mail source code lines. See https://datatracker.ietf.org/doc/html/rfc5322#section-2.1.1
78 chars are recommended BTWThis is not about the text itself, but about the encoded one inside the mail source code.
So we do not need to change apt-listchanges as long text lines are ok as long as the mail source code is correct.
apticron uses and distinguish heirloom-mailx and bsd-mailx/mailutils.The first one solves this issue itself by detecting too long lines, switching (and converting) to quoted-printable and break to long lines while adding an = at the end of each source code line which should be continued unwraped after rendering.
bsd-mailx/mailutils cannot do this. But you can manually set "Content-transfer-encoding: base64" and converting the input text to bas64 while limiting its length using the fold command.
I will attach a patch generated for https://salsa.debian.org/debian/apticron/-/raw/master/apticron?ref_type=heads
sglaeser
--- apticron?ref_type=heads 2026-10-02 14:24:59.127655485 +0200
+++ backup.txt 2026-10-02 14:31:47.619363311 +0200
@@ -23,18 +23,23 @@
/usr/bin/mailx -S ttycharset=utf-8 "$@" <
"$MAIL_BODY_FILE"
fi
else
+ # while heirloom-mailx can deal with overlong lines by
automatically using of and converting to quoted-printable, bsd-mailx/mailutils
cannot.
+ # So in the next lines the input is converted to base64 to fix
this:
+ cat "$MAIL_BODY_FILE" | base64 | fold -b -w 78 >
"$MAIL_BODY_FILE".tmp
+ mv -f "$MAIL_BODY_FILE".tmp "$MAIL_BODY_FILE"
+
# bsd-mailx/mailutils' mailx don't do character set
# conversion, but do not support MIME either.
if [ -n "$CUSTOM_FROM" ] ; then
/usr/bin/mailx -a "MIME-Version: 1.0" \
-a "Content-type: text/plain; charset=UTF-8" \
- -a "Content-transfer-encoding: 8bit" \
+ -a "Content-transfer-encoding: base64" \
-a "From: $CUSTOM_FROM" \
"$@" < "$MAIL_BODY_FILE"
else
/usr/bin/mailx -a "MIME-Version: 1.0" \
-a "Content-type: text/plain; charset=UTF-8" \
- -a "Content-transfer-encoding: 8bit" \
+ -a "Content-transfer-encoding: base64" \
"$@" < "$MAIL_BODY_FILE"
fi
fi
smime.p7s
Description: Kryptografische S/MIME-Signatur

