Uploaded image for project: 'Zeta Components'
  1. Zeta Components
  2. ZETACOMP-67

Calling mail methods (copyMessages(), delete(), fetchSizes(), setFlag()...) with many IDs/UIDs fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Mail
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            phpgangsta Michael Kliewe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: