Checking for new mail

Mark Sirota msir at uhura.cc.rochester.edu
Tue Aug 22 03:47:18 AEST 1989


In article <122772 at sun.Eng.Sun.COM> argv at sun.UUCP (Dan Heller) writes:
>In article <105 at csnz.co.nz> paul at 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 at cc.rochester.edu
 Bitnet:   msir at uordbv.bitnet
 UUCP:     {decvax,harvard,ames,rutgers}!rochester!ur-cc!msir



More information about the Comp.unix.xenix mailing list