A NOTE has been added to this issue. ====================================================================== http://dbmail.org/mantis/view.php?id=912 ====================================================================== Reported By: brendan Assigned To: paul ====================================================================== Project: DBMail Issue ID: 912 Category: IMAP daemon Reproducibility: always Severity: minor Priority: normal Status: feedback target: ====================================================================== Date Submitted: 05-Aug-11 22:12 CEST Last Modified: 31-Aug-11 20:57 CEST ====================================================================== Summary: IMAP body search always returns positive Description: I try a server-side search for messages whose body contains a particular string, and the result always returns all messages, including those not containing the string. ======================================================================
---------------------------------------------------------------------- (0003228) paul (administrator) - 15-Aug-11 16:33 http://dbmail.org/mantis/view.php?id=912#c3228 ---------------------------------------------------------------------- fixed now in git-HEAD ---------------------------------------------------------------------- (0003259) brendan (reporter) - 30-Aug-11 23:38 http://dbmail.org/mantis/view.php?id=912#c3259 ---------------------------------------------------------------------- Sorry. I applied the patch from git to the 3.0.0rc3 source, and it still does the same thing. http://git.dbmail.eu/paul/dbmail/commit/?id=b73172be67b4665b04c791f914cf284e01dea33c ---------------------------------------------------------------------- (0003260) paul (administrator) - 31-Aug-11 09:22 http://dbmail.org/mantis/view.php?id=912#c3260 ---------------------------------------------------------------------- Please provide level file_logging_level=511 logs for the broken search against a patched dbmail-imapd. ---------------------------------------------------------------------- (0003261) brendan (reporter) - 31-Aug-11 20:57 http://dbmail.org/mantis/view.php?id=912#c3261 ---------------------------------------------------------------------- Ah! That revealed the missing space before ORDER BY: Aug 31 11:24:36 devmailgw dbmail-imapd[7061]: [0x8c5b420] Database:[db] db_stmt_prepare(+400): [0x8c2a150] [SELECT DISTINCT m.message_idnr FROM dbmail_mimeparts p LEFT JOIN dbmail_partlists l ON p.id=l.part_id LEFT JOIN dbmail_physmessage s ON l.physmessage_id=s.id LEFT JOIN dbmail_messages m ON m.physmessage_id=s.id LEFT JOIN dbmail_mailboxes b ON m.mailbox_idnr = b.mailbox_idnr WHERE b.mailbox_idnr=? AND m.status IN (?,?) AND (l.part_key > 1 OR l.is_header=0) AND p.data LIKE BINARY ?ORDER BY m.message_idnr] Aug 31 11:24:36 devmailgw dbmail-imapd[7061]: [0x8c5b420] Error:[mailbox] mailbox_search(+1301): SQLException: Aug 31 11:24:36 devmailgw dbmail-imapd[7061]: [0x8c5b420] Database:[db] db_con_close(+274): [0x8c2a150] connection to pool Patched thus, and now it works! Thanks! *** dbmail-mailbox.c 2011-08-31 11:13:44.000000000 -0700 --- dbmail-mailbox.c.fixed 2011-08-31 11:49:51.000000000 -0700 *************** *** 1232,1234 **** "AND (l.part_key > 1 OR l.is_header=0) " ! "AND %s %s ?" "ORDER BY m.message_idnr", --- 1232,1234 ---- "AND (l.part_key > 1 OR l.is_header=0) " ! "AND %s %s ? " "ORDER BY m.message_idnr", Issue History Date Modified Username Field Change ====================================================================== 05-Aug-11 22:12 brendan New Issue 15-Aug-11 16:33 paul Note Added: 0003228 15-Aug-11 16:33 paul Assigned To => paul 15-Aug-11 16:33 paul Status new => resolved 15-Aug-11 16:33 paul Resolution open => fixed 15-Aug-11 16:33 paul Fixed in Version => 3.0.0-final 15-Aug-11 16:33 paul Additional Information Updated 30-Aug-11 23:38 brendan Note Added: 0003259 30-Aug-11 23:38 brendan Status resolved => feedback 30-Aug-11 23:38 brendan Resolution fixed => reopened 31-Aug-11 09:22 paul Note Added: 0003260 31-Aug-11 20:57 brendan Note Added: 0003261 ====================================================================== _______________________________________________ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev