Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!uunet!convex!tchrist@convex.COM From: tchrist@convex.COM (Tom Christiansen) Newsgroups: alt.sources.d Subject: Re: Cmail - check to see who's read their mail - UNIX Message-ID: <2337@convex.UUCP> Date: 24 Oct 89 13:45:49 GMT References: <4006@helios.ee.lbl.gov> Sender: usenet@convex.UUCP Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 24 In article <4006@helios.ee.lbl.gov>, leres@helios.ee.lbl.gov (Craig Leres) writes: >Note that if a user is logged in and uses biff (or sysline), you can't >really tell when mail was last read since biff reads new messages as >they arrive. This is particuarly a problem if the person stays logged >into a workstation 24 hours a day... Only if your vendor hasn't fixed biff(1) to save the st_atime from when it stats the file and restore it with utimes(2) after you're done reading. Once this is done, your shell can do this on login: if ($st_size) { printf "You have %s mail.\n", $st_atime > $st_mtime ? "old" : "new"; } oops, that was in perl not C :-) (i just wrote the perl translation to cmail and posted it to alt.sources) you see what i mean though. --tom Tom Christiansen {uunet,uiucdcs,sun}!convex!tchrist Convex Computer Corporation tchrist@convex.COM "EMACS belongs in : Editor too big!"