Calling mail methods (copyMessages(), delete(), fetchSizes(), setFlag()...)
with many IDs/UIDs fails
----------------------------------------------------------------------------------------------------
Key: ZETACOMP-67
URL: https://issues.apache.org/jira/browse/ZETACOMP-67
Project: Zeta Components
Issue Type: Bug
Components: Mail
Reporter: Michael Kliewe
Priority: Minor
If I want to copy many messages to another imap folder I get the IMAP error
"IMAP argument too long". I'm using a Dovecot IMAP server, which has a default
imap_max_line_length of 65536 bytes. I don't know if other IMAP servers have a
similar limit.
This problem exists in copyMessages(), fetchSizes(), delete(), top(),
fetchFlags(), setFlag(), clearFlag(), sortMessages() and I think in
sortFromOffset(), if the provided list of IDs (or UIDs) is too long and the
command string gets too long.
The only solution is to split the IDs/UIDs and then send multiple requests, and
collect all responses afterwards and merge them... not an easy task I think,
the question is if this has to be done in the mail classes or in my
application.
At the moment I split it in my application and call copyMessages() multiple
times with small arrays of UIDs. The best solution of cause is to handle it
inside the mail classes, which should take care of that limits.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira