Subject: Polling for new messages among several users' boxes

From: "Adam Bentley" <[email-masked]>
Date: Thu, 30 Jul 1998 16:11:57 -0600

I need to provide new mail notification and was planning to 
reuse an IMAP connection using mail_open to change users
and check for new messages in everybody's boxes.

Please tell me if there is a better way to do this from the client side.

Thanks
Bentley

------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: "Aleksandr M. Shvedov" <[email-masked]>
Date: Thu, 30 Jul 1998 18:56:36 -0400

>Please tell me if there is a better way to do this from the client
side.

Adam, mail_open is smart enough NOT to open a stream if the current
one is OK. But! If mbxes differ, mail_open will close/reopen a stream
each time. You might get tired reopening. So, in my opinion, it's your
environment - where is what - that matters. If you have 5 users, you
can keep 5 streams open and use a user/stream lookup table, for
example.

---

From: "Adam Bentley" <[email-masked]>
Date: Thu, 30 Jul 1998 17:06:15 -0600

Has anybody tried to set up a priviledged user who can
check for new-mail in anybody's mailbox?  Can IMAP support
that?  I would like to be able to check 1,000 mailboxes for 
new mail without having to login/logout multiple times or open/close 
mailstream session multiple times.

Bentley

>>> "Aleksandr M. Shvedov" <[email-masked]> 07/30 4:56 PM >>>

---

From: "Aleksandr M. Shvedov" <[email-masked]>
Date: Thu, 30 Jul 1998 20:01:33 -0400

>mailstream session multiple times.

It's simple for UNIX (AIX, Linux etc.) systems, if no IMAP client is
to be involved: go remotely to the machine on which mbxes are located
and check:

- /var/spool/mail/username file: all msgs that are still there are
"recent" in IMAP terms. IMAP server moves them into ~/mbox file when
the session ends;

- ~/mbox file for messages with "Status: O" string in the header
(these are not "recent" but just "unseen").

Note 1: "Status: RO" in mbox' headers means "seen". I prefer to read
it as R(ead) O(lready).

Note 2: ~ means user's home directory (smth like /home/username, it's
one of system settings), so ~/mbox might be a file whose actual
pathname is /home/username/mbox.