This is a port of the free comsat program from the 4.3BSD-tahoe release
to System V, with a FIFO (named pipe) replacing sockets.

When a new mail message is delivered, the local mail delivery agent
writes a message (for the format, see the comment at the top of
comsat.c) to a FIFO, which the comsat daemon reads.  If the recipient
of the mail is logged in and `biff y' (similar to mesg y but a
different bit of the tty is used), a message is printed on the user's
screen summarizing the new mail.

Files included in this package:

README		This file.
comsat.c	Daemon that prints the biff messages.
biff.c		Allow/prevent receipt of biff messages.
lmail.diffs	Diffs to lmail from comp.sources.misc volume 4, a local
		mail delivery program for smail 2.5, to make it write a
		message to the comsat FIFO when new mail is delivered.
mailwrap.c	An alternative approach to using lmail; a program to
		write a message to the comsat FIFO, then run your old,
		renamed local mail delivery program.
		Written by Jim Mattson <mattson%cs@ucsd.edu>.

Following is a list of the main portability issues I encountered while
porting comsat from 4.3BSD to System V.  In addition to these, I added
more comments and gave some identifiers more descriptive names, and ran
the file through GNU indent.

signals
sockets vs. FIFO
invocation and exit
error logging
index vs. strchr
sgtty vs. termio
gethostname vs. uname
failure of interrupted system calls (fgets seems to handle this correctly)

David MacKenzie
<edf@rocky2.rockefeller.edu>
