On Sun, 6 Jul 2025 at 12:01, Holger Levsen <hol...@layer-acht.org> wrote:
> > --- what provides mail(1) --is it mailx or mailutils etc? (probably doesnt
> > matter, but.)
>
> bsd-mailx

i'm not sure, but i think this may be the problem --- looking at
https://salsa.debian.org/debian/bsd-mailx/-/blob/master/send.c and
https://salsa.debian.org/debian/bsd-mailx/-/blob/master/debian/patches/02-Base-fixes-1.patch
it seems debian has patched bsd-mailx to hardcode /tmp (im not sure
about this, i only read the code on salsa, and couldnt spot where the
directory was set)?

does it work to use mailutils instead?

does editing /sbin/chkrootkit-daily to use sendmail fix it  (something
like this):

@@ -105,7 +105,11 @@ if [ -s "$FILE" ]; then
            # run by systemd: product a line on stdout for the journal
            echo "sending alert to $MAILTO: $SUBJECT"
        fi
-       mail -s "$SUBJECT" "$MAILTO" < "$FILE"
+       {
+         echo "$SUBJECT"
+         echo
+         cat "$FILE"
+       } | sendmail "$MAILTO"

Reply via email to