Solved: /etc/cron.daily/spamassassin: Wide character in print at /usr/bin/sa-compile line 433
Issue: When using spamassassin 3.4.2 in combination with Heinlein filter rules, you might encounter once a day messages from running the spamassassin cronjob as follows.
Wide character in print at /usr/bin/sa-compile line 433, <$fh> line 2757.
Wide character in print at /usr/bin/sa-compile line 433, <$fh> line 3260.
Reason: Some of the Heinlein rules in 70_HS_body.cf contain UTF-8 character, which are currently not handled /usr/bin/sa-compile command. You can find the rules at /var/lib/spamassassin/3.004002/spamassassin_heinlein-support_de/ for investigation. The warning is triggered by the fixup_re function in package Mail::SpamAssassin::Plugin::BodyRuleBaseExtractor, which replaces encoded and escaped utf-8 characters by their original character if the output stream is not utf-8 compatible.
Solution: Changing the output stream encoding to UTF-8 in sa-compile will prevent the warning, because UTF-8 characters outside of ASCII range can be be sent to the stream correctly. For your convenience, I attached the patch file sa-compile.patch.
cp /usr/bin/sa-compile /tmp/sa-compile.org
sudo patch /usr/bin/sa-compile sa-compile.patch
You can verify the successful patch, by running sa-compile as spamassassin user, e.g. debian-spamd. It should no longer output the warning.