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

ezcMailImapTransport fetchFlags regex does not work with dovecot 2.0

    XMLWordPrintableJSON

Details

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

    Description

      When connecting to a Dovecot 2.0 imap server I get an empty flag array, because the dovecot seems to return the results in a different order than expected. See this examples:

      Dovecot 2.0 Server:

      tag1 UID FETCH 1 (FLAGS)

      • 1 FETCH (UID 1 FLAGS (\Seen $NotJunk unknown-0))

      tag1 OK Fetch completed.

      Dovecot 1.2 Server:

      tag1 UID FETCH 2 (FLAGS)

      • 1 FETCH (FLAGS (\Seen $NotJunk) UID 2)

      tag1 OK Fetch completed.

      1und1 Server:

      tag1 UID FETCH 27134 (FLAGS)

      • 15992 FETCH (FLAGS (\Seen $NotJunk) UID 27134)

      tag1 OK UID FETCH finished.

      The used regex expects first the FLAGS and then the UID information.
      preg_match( '/*\s.\sFETCH\s(FLAGS ((.))\sUID\s(.*))/U', $response, $matches );

      There are 2 possible solutions:

      • make the regex variable so that it detects the FLAGS regardless of its position
      • change the request to "{$tag} {$uid}FETCH {$ids} (UID FLAGS)" so that the order is always the same and change the regex

      affected Version: eZ Components 2009.2.1

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: