[horde] Cannot export IMAP folder to MBOX
Jens Wahnes
wahnes at uni-koeln.de
Fri Nov 1 16:24:13 UTC 2019
Louis-Philippe Allard wrote:
> What is causing this?
I think the root cause is that the "download folder" feature does not
work very resource efficiently on the server running Imp. When operating
on a larger mail folder, it does use proper IMAP commands to retrieve
messages from the server in an efficient manner, but it seems to hold
either all of the messages or at least a good part of them in RAM, which
causes memory exhaustion within PHP after a while, even with very high
"memory_limit"s. The process also consumes substantial amounts of CPU
time while running. This might stem from the process trying to write the
output file line by line, but that's merely an assumption -- I haven't
found out exactly what the cause is.
Either way, downloading larger mail folders is likely to fail with the
current implementation.
As creating (and potentially zipping) a large mbox file clearly will be
quite resource intensive on the server in any implementation, I think it
might not even be possible to provide this kind of feature interactively
through the website. Preparing a large mbox file will almost always take
much more time to complete than today's users are expecting to wait for
anything they click on a website. So for large mail folders, this might
have to be a non-interactive service (e.g. the mbox file would be
prepared in the background and an email notification with a download
link would have to be sent to the user that requested the mbox file once
it's ready for download.)
Jens
More information about the horde
mailing list