Subject: Mailbox storage

From: "Daniel Fritzler" <[email-masked]>
Date: Mon, 5 Nov 2001 12:53:36 -0300

Hi,

I'm working on a mail client that has to maintain an updated list of:

- Disk usage of each mailbox.
- Total and unseen messages on each mailbox.

If I do a 'A01 EXAMINE 'mailbox'' and 'A02 FETCH 1:* RFC822.SIZE' for
each existing mailbox, I will probably end up killing the server.

Do you have any ideas of how to accomplish this without putting too much
load on the server?

Thank you.

Regards,
Daniel F.

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

---

From: Mark Crispin <[email-masked]>
Date: Mon, 5 Nov 2001 11:31:05 -0800 (PST)

> each existing mailbox, I will probably end up killing the server.

Although this is certainly not a nice thing to do, it isn't as expensive
on the server as you may think.

The cost of the fetch is network traffic; the server load is minimal.

With my server, the cost of EXAMINE is not significantly different from
STATUS.  It's possible that with other servers, EXAMINE may be more
expensive than STATUS, but I speculate that if STATUS is cheap in a server
implementation, EXAMINE is probably not too much more expensive.  The main
benefit of STATUS is to avoid changing client selected state.

The real issue is how frequently you plan to do this.  If this is a once
every minute update, it will be bad news.  But if you're trying to
generate a once-a-day report, it may be alright.

As an alternative, you may want to consider a server-based tool instead of
trying to shoehorn this functionality into IMAP.  If it were me, if I had
to do this task as a one-shot I'd probably use IMAP; but if I had to do it
more than once I'd write a server based tool optimized for that task.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.