[Alpine-info] maximum number of messages per folder exceeded
Eduardo Chappa
chappa at u.washington.edu
Fri Sep 3 18:52:59 PDT 2010
On Fri, 3 Sep 2010, Dimitrios Apostolou wrote:
:) > around this by not attempting to download 1 million posts. The point
:) > is, that only a subset of that you will read before you quit Alpine.
:) > What you could is to use the "NNTP Range" to make Alpine download a
:) > subset of the posts.
:)
:) I don't really understand what you mean by "download 1M posts". The
:) reason I'm using alpine is because it is the best *online* IMAP/NNTP
:) client. As such I thought that it doesn't download any posts, not even
:) any headers except the ones displayed on screen.
Almost true, it downloads 20 at the time, but that is not the point.
:) Please correct me if I'm wrong, but if it is that way then it shouldn't
:) matter memory-wise whether I'm browsing a folder of 1K posts, 1M posts,
:) or 1G posts (even though practically I've seen difference, but not that
:) big to fit all headers). That's why I mentioned the limit would be
:) better at 2G or 4G, because I thought the only constraint would be
:) signed/unsigned integer size. Please enlighten me about alpine
:) internals.
The limit is not 1G, it is 1 million. Why it is 1 million or why is there
a limit in the first place? I don't know, but the c-client library (not
Alpine) causes itself to crash once this limit is surpassed (it does this
by changing the number of messages to the maximum allowed. The crash is in
the mail_elt function once Alpine creates the maximum + 1 message.
Here is the relevant code:
if (nmsgs > MAXMESSAGES) {
sprintf (tmp,"Mailbox has more messages (%lu) exist than maximum
(%lu)",
nmsgs,MAXMESSAGES);
mm_log (tmp,ERROR);
nmsgs = MAXMESSAGES; /* cap to maximum */
/* probably will crash in mail_elt() soon enough... */
}
/* make sure cache is large enough */
(*mailcache) (stream,nmsgs,CH_SIZE);
stream->nmsgs = nmsgs; /* update stream status */
This code sets stream->nmsgs = MAXMESSAGES when nmsgs = MAXMESSAGES + 1.
On the other hand, mail_elt there is this code
if (msgno < 1 || msgno > stream->nmsgs) {
char tmp[MAILTMPLEN];
sprintf (tmp,"Bad msgno %lu in mail_elt, nmsgs = %lu, mbx=%.80s",
msgno,stream->nmsgs,stream->mailbox ? stream->mailbox : "???");
fatal (tmp);
}
so you see it is clear that c-client knows about the crash, but have no
idea why there is a limit in the first place. It is not used anywhere
else.
--
Eduardo
http://staff.washington.edu/chappa/alpine/
More information about the Alpine-info
mailing list