[comp.mail.misc] Controlling Biff

schisto@popvax.harvard.edu (]none) (02/14/90)

Greetings net.friends,
    I would very much like to control the "biff" command.  As i've
seen in the 4.3BSD manual and our on-line Ultrix 3.0 manual, i only
have the option of turning biff on or off.  The control i seek would
ideally allow me to set biff to write to screen as much of the incoming 
message as i would like.  If the ideal isn't possible, then perhaps
someone knows how to get biff to simply beep with either a simple
message saying "you have mail" or no message at all.

Thanks for your attention,
     ______
     \    /  LTD
      \/\/   Internet: schisto@popvax.harvard.edu
      /\/\   Bitnet: schisto@harvsphb.bitnet
     /____\  IP: schisto@128.103.73.1
 Note: these addresses (along with the address in the header) apply
 to account which several people use for email purposes.  If you 
 respond to me via email, please indicate "LTD" as the recipient
 in the "Subject" line.  Thanks.

eps@toaster.SFSU.EDU (Eric P. Scott) (02/15/90)

In article <1579@husc6.harvard.edu> schisto@popvax.harvard.edu (]none) writes:
>    I would very much like to control the "biff" command.  As i've
>seen in the 4.3BSD manual and our on-line Ultrix 3.0 manual, i only
>have the option of turning biff on or off.

This is because all biff does is set or clear a permission bit on
your login terminal.  RTFM for comsat--that's what's actually
doing the notification.  If you find it a bit inflexible, look in
the comp.sources.unix archives for "improved" replacements.  [Yes,
they'd need to be installed by a superuser.]

					-=EPS=-

chip@tct.uucp (Chip Salzenberg) (02/15/90)

According to schisto@popvax.harvard.edu (]none):
>    I would very much like to control the "biff" command.  As i've
>seen in the 4.3BSD manual and our on-line Ultrix 3.0 manual, i only
>have the option of turning biff on or off.  The control i seek would
>ideally allow me to set biff to write to screen as much of the incoming 
>message as i would like.

As usual, you can do it with Deliver 2.0.  My .deliver file -- the
shell script that controls mail delivery, each user can create one --
notifies me when mail arrives.  Here it is:

	# Delivery for Chip
	PATH=/bin:/usr/bin:/u/local/bin ; export PATH
	user="$1"
	echo $user
	for tty in `who | awk '$1 == "'"$user"'" { print $2 }'`
	do
	    f="`header -f from $HEADER`"
	    [ "" != "$f" ] || f="$SENDER"
	    m="Hey!  You have new mail from $f."
	    echo "\n>>> $m <<<\n" >>/dev/$tty 2>/dev/null
	done

If you want the header, or specific fields thereof, you can add some
commands.  Use:

	cat $HEADER >>/dev/$tty

for the whole header, or:

	header -n -f from -f to -f subject $HEADER >>/dev/$tty

for those specific fields.  Possible actions on mail delivery are
limited only by the imagination.

Deliver 2.0, at finer archive sites everywhere.

Not Just Another Deliver Hacker,
-- 
Chip Salzenberg at ComDev/TCT     <chip@tct.uucp>, <uunet!ateng!tct!chip>
         "The Usenet, in a very real sense, does not exist."

towfiq@interlan.Interlan.COM (Mark Towfigh) (02/17/90)

In article <1579@husc6.harvard.edu> schisto@popvax.harvard.edu (LTD)
writes:

       I would very much like to control the "biff" command.  As i've
   seen in the 4.3BSD manual and our on-line Ultrix 3.0 manual, i only
   have the option of turning biff on or off.  The control i seek would
   ideally allow me to set biff to write to screen as much of the incoming 
   message as i would like.  If the ideal isn't possible, then perhaps
   someone knows how to get biff to simply beep with either a simple
   message saying "you have mail" or no message at all.

You would have to modify the program comsat to perform the first
action you desire.  Biff is just a program which tells comsat if you
would like to be informed of incoming mail or not. I would suggest
that you do not want to bother doing this, however, because there is
another program, sysline, which notifies you of mail in just the way
you want: it displays only on the status line of your terminal, and
tries to display as much of the message as possible when it arrives.

Check out sysline, and seen if that isn't what you want; it doesn't
even mess up your screen!  You can't run it on a vt100, unfortunately,
but if you're running a vt100-clone, like a wyse85, that might have
such a capability built-in.
--
Mark Towfigh, Racal Interlan, Inc.                 towfiq@interlan.Interlan.COM
W: (508) 263-9929 H: (617) 488-2818                       uunet!interlan!towfiq

  "The Earth is but One Country, and Mankind its Citizens" -- Baha'u'llah

akf@mentor.cc.purdue.edu (Jay Hinkelman) (02/26/90)

In article <TOWFIQ.90Feb16102953@interlan.Interlan.COM> towfiq@interlan.Interlan.COM (Mark Towfigh) writes:

>In article <1579@husc6.harvard.edu> schisto@popvax.harvard.edu (LTD)
>writes:

>       I would very much like to control the "biff" command.  As i've
>   seen in the 4.3BSD manual and our on-line Ultrix 3.0 manual, i only
>   have the option of turning biff on or off.

>You would have to modify the program comsat to perform the first
>action you desire.  Biff is just a program which tells comsat if you
>would like to be informed of incoming mail or not.

That's funny; on our local 4.3BSD system we have three possible
options to biff:

y	turns on full mail notification (prints the mess on your screen)
n	turns mail notification off completely
b	turns on partial mail notification -- terminal beeps
	      twice upon receipt of mail.

I had no idea this was a local add-on.  Learn something new every
night...

-- 
				 Jay Hinkelman, akf@mentor.cc.purdue.edu
"Catch ya later, Bill and Ted!"	     -- Bill and Ted