home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!bilpin!pd
- From: pd@bilpin.co.uk (Paul Davison)
- Newsgroups: comp.unix.aux
- Subject: Re: A simple mail notifier hybrid application
- Message-ID: <1992Nov10.111110.4986@bilpin.co.uk>
- Date: 10 Nov 92 11:11:10 GMT
- References: <1992Nov5.154441.24439@bilpin.co.uk> <1992Nov5.224949.26290@newsgate.sps.mot.com> <1226@jagubox.gsfc.nasa.gov>
- Sender: news@bilpin.co.uk (NetNews Administrator)
- Organization: SRL Data
- Lines: 30
-
- >One small nit-picky point. I looked at the code for just a smidge,
- >but it looks like it depends on a change in 'stat' of the user's mailbox
- >(/usr/mail) to see if new mail has been rec'd. This is great. But, what
- >if mail exists there that you haven't read when you startup? Not doesn't
- >(I think) notify you.
-
- >Maybe it would be better to, at startup, get the 'stat'. If non-zero,
- >the Notify.
-
- >Whatcha think?
-
- Yeah, I did think about this. The way I tend to use my mailbox, stuff
- that is Really Important gets left in my incoming folder so that I get
- to see it all the time. I thought it was debatable whether I should get
- notified about mail I'd already read upon login.
-
- I thought of ways you could check whether there was any *unread* mail
- when you log in. Some user agents insert a Status: header in each
- message, which would do the trick, but this isn't done by all UAs and I
- wanted to keep things simple.
-
- However I think I might be able to use the same trick at startup that I
- do to work out if the messages have been read, which is to look at
- stat's st_atime field, which isn't altered by write(2), and compare it
- with st_mtime, which *is* altered by write(2). I'll have a play with
- this today... more later!
- --
- Paul Davison (postmaster) SRL Data || E-Mail : pd@bilpin.co.uk
- 1 Perren Street, London NW5 3ED, UK || Applelink : UK.DTS
- Tel: +44 71 267 2561 || Fax: : +44 71 267 1497
-