The following issue has been RESOLVED. ====================================================================== http://www.dbmail.org/mantis/view.php?id=294 ====================================================================== Reported By: idk Assigned To: aaron ====================================================================== Project: DBMail Issue ID: 294 Category: IMAP daemon Reproducibility: always Severity: minor Priority: normal Status: resolved target: Resolution: fixed Fixed in Version: ====================================================================== Date Submitted: 27-Jan-06 19:28 CET Last Modified: 18-Jun-06 08:41 CEST ====================================================================== Summary: Server doesn't work properly with messages with empty body Description: When message has no body (nor empty line), server inserts into database only one block (with headers). Later, when size of message is calculating (by FETCH BODY command), db_dump_range returns -1, so tmpdumpsize += db_dump_range() sets tmpdumpsize to -1, but this variable is unsigned, so 0xFFFF FFFF FFFF FFFF (18446744073709551615). Some garbage (memory dump?) is also returned to imap client. ======================================================================
---------------------------------------------------------------------- paul - 27-Jan-06 20:59 ---------------------------------------------------------------------- This was fixed a long time ago in 2.1 already. There, these sizes are always calculated correctly at insertion time, never during retrieval. Given the low impact of this bug, I setting this to wont-fix. ---------------------------------------------------------------------- idk - 14-Mar-06 18:00 ---------------------------------------------------------------------- Ok. But 2.1 is not stable (by design), so I can wait on 2.2 release. Till then I will use my patch (attached dbmsgbuf.c.diff). ---------------------------------------------------------------------- aaron - 30-Apr-06 00:54 ---------------------------------------------------------------------- I'd like to see this fixed by adding temporary variables to catch the return from db_dump_range and, if -1, working around it. The big problem I see is this: cached_msg.dumpsize += db_dump_range(...); ... ci_write(ci->tx, "RFC822 {%llu}\r\n", cached_msg.dumpsize); That right there is major problem when dumpsize might be negative! Given that all of the consumers of db_dump_range don't error check anyways, the patch might actually be viable; it just says, "I can't figure this out, do your best with zero." Certainly that's better here than -1. ---------------------------------------------------------------------- aaron - 18-Jun-06 08:41 ---------------------------------------------------------------------- The patch is reasonable though not pretty, committed to SVN. Issue History Date Modified Username Field Change ====================================================================== 27-Jan-06 19:28 idk New Issue 27-Jan-06 19:28 idk File Added: maillog.txt 27-Jan-06 20:59 paul Note Added: 0000980 27-Jan-06 20:59 paul Status new => acknowledged 27-Jan-06 20:59 paul Resolution open => won't fix 14-Mar-06 18:00 idk File Added: dbmsgbuf.c.diff 14-Mar-06 18:00 idk Note Added: 0001038 30-Apr-06 00:54 aaron Note Added: 0001125 18-Jun-06 08:41 aaron Status acknowledged => resolved 18-Jun-06 08:41 aaron Resolution won't fix => fixed 18-Jun-06 08:41 aaron Assigned To => aaron 18-Jun-06 08:41 aaron Note Added: 0001252 ======================================================================