Xref: utzoo comp.mail.misc:2295 comp.unix.xenix:7230 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!rochester!uhura.cc.rochester.edu!msir From: msir@uhura.cc.rochester.edu (Mark Sirota) Newsgroups: comp.mail.misc,comp.unix.xenix Subject: Re: Checking for new mail Message-ID: <2847@ur-cc.UUCP> Date: 21 Aug 89 17:47:18 GMT References: <105@csnz.co.nz> <122772@sun.Eng.Sun.COM> Reply-To: Mark Sirota Organization: Univ. of Rochester, Computing Center Lines: 28 In article <122772@sun.Eng.Sun.COM> argv@sun.UUCP (Dan Heller) writes: >In article <105@csnz.co.nz> paul@csnz.co.nz (Paul Gillingwater) writes: >> What's the best way to check for the arrival of new mail? >> I'm writing in C using SCO Xenix 2.3.1, but no doubt other approaches >> Any ideas? Code fragments would be appreciated.... > > So, I wrote a program called "watch" which watches your mailbox and, > in the event of new mail, it prints info about the mail (who it's from, > when it arrived, and the subject) on the terminal's status line. For > window systems, it writes it to the titlebar of your window (command > line specification for this may be necessary depending on your window). Similarly, I wrote a program which you call from your .forward file (assuming you run sendmail), which informs you when new mail comes in. This, I think, is better than a program which sits around and checks every so often, because it tells you immediately, doesn't sit around taking CPU time or memory or whatnot (which is a problem for those of us on machines where CPU-time accounting is done), and unlike biff, it doesn't mess up your screen when mail comes in (if you use your status line or titlebar). My program isn't quite polished enough to publish, but perhaps it could be if there was enough call for it. Dan's program appears to be excellent; I just wanted to recommend the concept of using your .forward file for this. -- Mark Sirota - University of Rochester, Rochester, NY Internet: msir@cc.rochester.edu Bitnet: msir@uordbv.bitnet UUCP: {decvax,harvard,ames,rutgers}!rochester!ur-cc!msir