Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ukma!wuarchive!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!rickert From: rickert@mp.cs.niu.edu (Neil Rickert) Newsgroups: comp.mail.misc Subject: Re: SMail and biff Keywords: smail, biff, comsat Message-ID: <1991May21.195502.9388@mp.cs.niu.edu> Date: 21 May 91 19:55:02 GMT References: <2989@odin.cs.hw.ac.uk> <1991May18.043542.27251@Veritas.COM> <22812@shlump.lkg.dec.com> Organization: Northern Illinois University Lines: 30 In article <22812@shlump.lkg.dec.com> lan_csse@netrix.nac.dec.com (CSSE LAN Test Account) writes: >What biff does is wake up periodically and check the mtime for your >mail file (/usr/spool/mail/$USER). Test this by: > echo Hi there >> /usr/spool/mail/$USER >and sit back and wait. After a couple of minutes, biff will tell you >that you have new mail. It's that simple. All you have to do it get >smail to append the mail to the mailbox. Naw. It is your shell which does that. Just set the right shell variable (MAIL for /bin/sh, mail for /bin/csh) the the path of your mail spool file, and see it happen. Biff does more. It prints part of the incoming message the moment it arrives. Actually biff itself doesn't do much more than chmod u+x `tty` . But when /bin/mail delivers mail to your mailbox, it also sends a packet to the 'comsat' network daemon giving it the name of your mailbox and the offset to the new message. comsat looks in /etc/utmp to see if your are logged in, then checks the 'x' bit of your tty to see if you wish to be biffed, then prints a few lines from the message on your terminal. The Berkeley version of /bin/mail are available with sendmail sources, so if you want to do something similar you can probably steal a few lines of code. -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science Northern Illinois Univ. DeKalb, IL 60115 +1-815-753-6940