A NOTE has been added to this issue. ====================================================================== http://www.dbmail.org/mantis/view.php?id=982 ====================================================================== Reported By: vampyre Assigned To: ====================================================================== Project: DBMail Issue ID: 982 Category: IMAP daemon Reproducibility: always Severity: major Priority: normal Status: new target: ====================================================================== Date Submitted: 29-Aug-12 15:55 CEST Last Modified: 30-Aug-12 09:45 CEST ====================================================================== Summary: FETCH doesn't work on empty folder Description: Hello Paul,
I am trying to do a FETCH on empty mailbox and get the response "BAD invalid sequence" (while the same had been working for dbmail-2.3). I have added some debug and it looks like the issue is in MailboxState_getExist: === if ((! uid ) && (MailboxState_getExists(self->mbstate) == 0)) // empty mailbox return NULL; === Btw, it is better to add some log messages in such places as it is hard to track. ====================================================================== ---------------------------------------------------------------------- (0003473) vampyre (reporter) - 29-Aug-12 16:29 http://www.dbmail.org/mantis/view.php?id=982#c3473 ---------------------------------------------------------------------- Paul, Could you please consider enclosed patch. Thank you in advance. ---------------------------------------------------------------------- (0003474) paul (administrator) - 30-Aug-12 09:45 http://www.dbmail.org/mantis/view.php?id=982#c3474 ---------------------------------------------------------------------- What makes you think a BAD response is invalid? As far as I know it is *required*. >From the RFC: seq-number = nz-number / "*" ; message sequence number (COPY, FETCH, STORE ; commands) or unique identifier (UID COPY, ; UID FETCH, UID STORE commands). ; * represents the largest number in use. In ; the case of message sequence numbers, it is ; the number of messages in a non-empty mailbox. ; In the case of unique identifiers, it is the ; unique identifier of the last message in the ; mailbox or, if the mailbox is empty, the ; mailbox's current UIDNEXT value. ; The server should respond with a tagged BAD ; response to a command that uses a message ; sequence number greater than the number of ; messages in the selected mailbox. This ; includes "*" if the selected mailbox is empty. Which means that for an empty mailbox: x FETCH * (UID) should result in a BAD response, whereas x UID FETCH * (UID) will return a OK response. Issue History Date Modified Username Field Change ====================================================================== 29-Aug-12 15:55 vampyre New Issue 29-Aug-12 16:27 vampyre File Added: 0001-TT-0000982-FETCH-fix-for-empty-mailbox.patch 29-Aug-12 16:29 vampyre Note Added: 0003473 30-Aug-12 09:45 paul Note Added: 0003474 ====================================================================== _______________________________________________ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev