You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-issues@incubator.apache.org by "Michael Kliewe (JIRA)" <ji...@apache.org> on 2011/03/17 12:48:29 UTC

[jira] Created: (ZETACOMP-67) Calling mail methods (copyMessages(), delete(), fetchSizes(), setFlag()...) with many IDs/UIDs fails

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