The following issue has been RESOLVED.
======================================================================
http://www.dbmail.org/mantis/view.php?id=416
======================================================================
Reported By: schwarz
Assigned To: aaron
======================================================================
Project: DBMail
Issue ID: 416
Category: IMAP daemon
Reproducibility: always
Severity: minor
Priority: normal
Status: resolved
target:
Resolution: fixed
Fixed in Version: 2.0 branch
======================================================================
Date Submitted: 25-Sep-06 13:59 CEST
Last Modified: 11-Oct-06 05:14 CEST
======================================================================
Summary: Server doesn't work properly with messages with
empty body
Description:
(Sorry, I did not know how to re-open or comment to the existing bug
0000294 so
this is actually a duplicate...)
The patch "dbmsgbuf.c.diff" in 0000294 does not solve the problem for me.
I'm running dbmail 2.0.10. When I send in a new message with empty body,
Thunderbird displays a message size of 2097151kb:
# mail -s "test-message without body" schwarz < /dev/null
Null message body; hope that's ok
#
When tracing the IMAP connection, one can clearly see dbmail's bug:
25 UID fetch 169924 (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (From
To Cc Subject Date Message-ID Priority X-Priority References Newsgroups
In-Reply-To Content-Type X-Spam-Status X-Spam-Flag)])
* 1 FETCH (
UID 169924 RFC822.SIZE 4612086928928768099 FLAGS (\Recent)
BODY[HEADER.FIELDS (From To Cc Subject Date Message-ID Priority X-Priority
References Newsgroups In-Reply-To Content-Type X-Spam-Status X-Spam-Flag)]
{211}
Subject: test-message without body
To: [EMAIL PROTECTED]
Message-Id: <[EMAIL PROTECTED]>
From: root <[EMAIL PROTECTED]>
Date: Mon, 25 Sep 2006 13:50:23 +0200
)
25 OK UID FETCH completed
Any help is appreciated!
Thanks,
Chris
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
duplicate of 0000294 Server doesn't work properly with messa...
======================================================================
----------------------------------------------------------------------
aaron - 06-Oct-06 18:56
----------------------------------------------------------------------
I suspect that you have old rfc size values caches in the database, perhaps
as a result of the older bug. Try this:
"SELECT rfcsize FROM dbmail_messages WHERE message_idnr = ..."
on your message with the empty body. Let's see what it says.
----------------------------------------------------------------------
jasb - 06-Oct-06 19:11
----------------------------------------------------------------------
Aaron, i have something similar to this, with roundcube for example
messages without body roundcube doesn't open them (it can be also a
roundcube problem i admit)
i tried what you just sayd and:
SELECT rfcsize FROM dbmail_messages WHERE message_idnr=233085
Unknown column 'rfcsize' in 'field list'
:| is suposed that this field exist on this table?
Or did you wanted to say dbmail_physmessage table?
With the dbmail_physmessage:
SELECT rfcsize FROM dbmail_physmessage WHERE id=233085
1 row returned with:
1550
----------------------------------------------------------------------
aaron - 08-Oct-06 08:06
----------------------------------------------------------------------
Nope, this is a bug on the 2.0 branch, related to a previous 2.0 bug.
If you're seeing something similar, it is no doubt a different issue.
*sigh* Open up a new bug... :-|
----------------------------------------------------------------------
aaron - 09-Oct-06 04:55
----------------------------------------------------------------------
Chris, please tell me if you see this line in your logs just before the
screwy RFC822.SIZE:
ic_fetch(): no parsing at all
Thanks!
----------------------------------------------------------------------
aaron - 09-Oct-06 05:54
----------------------------------------------------------------------
Ok, here's another one to look for:
dbmysql.c,db_get_length: result set is null
----------------------------------------------------------------------
schwarz - 09-Oct-06 11:01
----------------------------------------------------------------------
Hi Aaron!
"ic_fetch(): no parsing at all" shows up in the log:
Oct 9 10:54:48 kandinsky dbmail/imap4d[2304]: ic_fetch(): no parsing at
all
Oct 9 10:54:48 kandinsky dbmail/imap4d[2304]: _ic_fetch(): no parsing,
into fet
ch loop
Oct 9 10:54:48 kandinsky dbmail/imap4d[2304]: _ic_fetch(): no parsing,
into fet
ch loop
However, no entries with "dbmysql.c,db_get_length" show up in the log.
Regarding the "rfc size" hint: the rfc size of the messages with empty
body is "astronomically high":
messagesize = 66, rfcsize = 9223372036854775807
I've debugged the problem myself: the problem lies in header.c:
get_rfc_size() doesn't set the output var rfcsize if the message body is
empty.
I've attached a patch which fixes the problem for me. This resolves the
whole issue.
Chris
----------------------------------------------------------------------
aaron - 09-Oct-06 18:01
----------------------------------------------------------------------
In SVN this issue was fixed with this chunk of code, right where your fix
is:
if (remaining_len == 0) {
*rfcsize = 0;
return;
}
Were you not running the latest SVN in dbmail_2_0_branch?
Might be time to snap out another 2.0 release with this fix.
----------------------------------------------------------------------
jasb - 10-Oct-06 01:03
----------------------------------------------------------------------
Is there any fix for 2.1 svn Aaron?
----------------------------------------------------------------------
aaron - 10-Oct-06 02:10
----------------------------------------------------------------------
There is no fix for this bug in 2.1 because it's not the same bug. The code
with this bug in 2.0 simply does not exist in 2.1. If the same symptoms
appear, they are from a different cause and need to be handled separately.
Please open a new bug and post relevant logs and imap session traces so
that we can investigate the problem. Thanks!
----------------------------------------------------------------------
schwarz - 10-Oct-06 09:24
----------------------------------------------------------------------
> Were you not running the latest SVN in dbmail_2_0_branch?
Oops, I had the latest SVN checkout on my harddisk but missed this change.
Actually, I'm running a version based on the Debian packages from
http://debian.nfgd.net/debian/dists/stable/main/binary-i386/mail/ with
some additional patches.
> Might be time to snap out another 2.0 release with this fix.
Yes, that would be a good idea. (Especially since distros usually only
update their packages with new releases.)
Thanks,
Chris
----------------------------------------------------------------------
aaron - 11-Oct-06 05:14
----------------------------------------------------------------------
We should schedule another 2.0 release ASAP.
Issue History
Date Modified Username Field Change
======================================================================
25-Sep-06 13:59 schwarz New Issue
25-Sep-06 13:59 schwarz Issue Monitored: schwarz
25-Sep-06 23:21 jasb Issue Monitored: jasb
06-Oct-06 18:56 aaron Note Added: 0001476
06-Oct-06 19:11 jasb Note Added: 0001477
08-Oct-06 08:06 aaron Note Added: 0001481
09-Oct-06 04:55 aaron Note Added: 0001485
09-Oct-06 05:54 aaron Note Added: 0001486
09-Oct-06 11:01 schwarz Note Added: 0001488
09-Oct-06 11:01 schwarz File Added: patch
09-Oct-06 18:01 aaron Note Added: 0001491
10-Oct-06 01:03 jasb Note Added: 0001492
10-Oct-06 02:10 aaron Note Added: 0001493
10-Oct-06 09:24 schwarz Note Added: 0001494
11-Oct-06 05:14 aaron Relationship added duplicate of 0000294
11-Oct-06 05:14 aaron Duplicate ID 0 => 294
11-Oct-06 05:14 aaron Status new => resolved
11-Oct-06 05:14 aaron Fixed in Version => 2.0 branch
11-Oct-06 05:14 aaron Resolution open => fixed
11-Oct-06 05:14 aaron Assigned To => aaron
11-Oct-06 05:14 aaron Note Added: 0001497
======================================================================