Date: Sat, 11 Sep 2021 11:34:03 +0200 From: Matthias Apitz <guru@unixarea.de> To: freebsd-questions@freebsd.org Subject: Re: monitoring incoming mailbox in console mode Message-ID: <YTx4C7zsVOFCSIGo@c720-r368166> In-Reply-To: <YTmuVMh0FJ3zTpu8@c720-r368166> References: <20210908124536.GA17@sh4-5.1blu.de> <20210908203244.57309565.freebsd@edvax.de> <YTmuVMh0FJ3zTpu8@c720-r368166>
next in thread | previous in thread | raw e-mail | index | archive | help
El día jueves, septiembre 09, 2021 a las 08:48:52a. m. +0200, Matthias Apitz escribió:
>
> Thanks for the hints about biff(1). I wasn't aware of it, even if I was
> used to use xbiff in the past.
>
> But, biff(1) does not do anything. I run
>
> $ truss -o biff.tr -f biff b
>
> and attached is the output of biff.tr. Any ideas?
I've had a glance through the source in /usr/src/usr.bin/biff/biff.c and
it only tweaks on some bits in the perms of the tty you're login on:
...
switch (argv[0][0]) {
case 'n':
if (chmod(name, sb.st_mode & ~(S_IXUSR | S_IXGRP)) < 0)
err(2, "%s", name);
break;
case 'y':
if (chmod(name, (sb.st_mode & ~(S_IXUSR | S_IXGRP)) | S_IXUSR)
< 0)
err(2, "%s", name);
break;
case 'b':
if (chmod(name, (sb.st_mode & ~(S_IXUSR | S_IXGRP)) | S_IXGRP)
< 0)
err(2, "%s", name);
break;
default:
usage();
}
return (sb.st_mode & (S_IXUSR | S_IXGRP) ? 0 : 1);
...
and then exits. The rest should depend on the login shell and its env
var MAIL and/or MAIL_PATH.
Said that, it does not do what I want because in many times my netbook
is only booted, receives mails to /var/mail/guru and I'm only connected
via SSH to it.
matthias
--
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
August 13, 1961: Better a wall than a war. And, while the GDR was still existing,
no German troups and bombs have been killed in Yugoslavia, Afghanistan, Afrika...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YTx4C7zsVOFCSIGo>
