Subject: EEE-normous File Attachments

From: "[email-masked]" <[email-masked]>
Date: Fri, 22 Oct 1999 16:41:29 GMT

I realize the ridiculous cause of the problem, but as a company system admin, my
cries for sanity are rarely heard.  

What is the best way to deal with huge file attachments in c-client
and ultimately, imapd/ipopd?

My situation is that I have someone sending 25 megabyte file attachments, and it
bombs during retrieval of that particular message.  Both my custom interface and
handlers (using c-client) as well as ipopd and imapd are having problems, so I
think this is something within the library (imap-4.6.BETA).  I'm certain that c-client
is bouncing up against some limit on the machine; perhaps /var/tmp or /tmp space?
 The machine does not appear to be using any swap space while it's manipulating
the mailbox, and no drastic 

This has happened under SGI Irix 6.5. 

Any ideas? 

-- 
------------------------------------------------------------------
 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: Fri, 22 Oct 1999 09:57:02 -0700 (PDT)

> and ultimately, imapd/ipopd?

There must be adequate virtual memory (and ideally physical memory) to handle
the attachment.  Depending upon the mailbox format, you may need considerably
more memory; I would not try to make a 32MB RAM system handle 25MB
attachments.

One problem is that c-client needs to know the exact size of the attachment in
CRLF-normalized form before sending it, as well as present it in that form;
this presents considerable complications (especially with partial fetches)
since in the default UNIX mailbox format the data is not in that form.

Just about the only way to avoid this problem is for IMAP clients *only*; they
can use the partial fetching functions and field the reassembly of the
attachment in their own code.  This doesn't apply for POP clients, or for
local mailbox access.

> My situation is that I have someone sending 25 megabyte file attachments,
> and it bombs during retrieval of that particular message.

Please clarify what you mean by "bombs"; that's too imprecise to make a
diagnosis.  What, precisely, happens?  What error message do you get?

> Both my custom interface and handlers (using c-client)

What are your "custom interface and handlers"?  Do you mean c-client drivers
into some private mailbox format?  Do you mean your own client and user
interface?

> as well as ipopd and
> imapd are having problems, so I think this is something within the library
> (imap-4.6.BETA).  I'm certain that c-client is bouncing up against some
> limit on the machine; perhaps /var/tmp or /tmp space?

I can't determine this without knowing what message c-client issued.

>  The machine does not appear to be using any swap space while it's
> manipulating the mailbox

Running out of swap space is the likely explanation; followed by running out
of some arbitrary per-process memory use limitation.  The details of the
"bomb" are important in diagnosis.