A NOTE has been added to this issue. ====================================================================== http://www.dbmail.org/mantis/view.php?id=335 ====================================================================== Reported By: sayler Assigned To: ====================================================================== Project: DBMail Issue ID: 335 Category: Authentication layer Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 25-Apr-06 00:01 CEST Last Modified: 28-Apr-06 20:27 CEST ====================================================================== Summary: X-Invalid-Header generated and I can't figure out why Description: I'm going to attach a message gleaned from a user with problems. I've been trying to figure out what it is about this message that causes the issue, but no luck.
dbmail-smtp -d [EMAIL PROTECTED] < badmessage.txt download message. Old header (munged from original message) exerpt: Date: Ijk, 45 Nop 9012 34:56:78 -9012 Subject: [EfghijkLMNOP-q] Rstu Vwx [EMAIL PROTECTED] **Bcd Efghij & Klm Nopq** Reply-To: <[EMAIL PROTECTED]> X-Spam-Checker-Version: Wxy`Abcdefgh 7.8.9 (0123-45-67) tu vwxy.`abcdefgh.ijk X-Spam-Level: X-Spam-Status: Lm, nopqr=3.4 uvwxy`ab=3.4 efghi=JKLM_NOPQ_RST,[EMAIL PROTECTED] fghijklmn=op qrstuvw=0.1.2 New header exerpt: Date: Ijk, 45 Nop 9012 34:56:78 -9012 Subject: [EfghijkLMNOP-q] Rstu Vwx [EMAIL PROTECTED] **Bcd Efghij & Klm Nopq** Reply-To: <[EMAIL PROTECTED]> X-Invalid-Header: cdefgh 7.8.9 (0123-45-67) tu vwxy.`abcdefgh.ijk X-Spam-Level: X-Spam-Status: Lm, nopqr=3.4 uvwxy`ab=3.4 efghi=JKLM_NOPQ_RST,[EMAIL PROTECTED] fghijklmn=op qrstuvw=0.1.2 X-DBMail-PhysMessage-ID: 450759 MIME-Version: 1.0 (note the problem was identical before I munged the header values..) ====================================================================== ---------------------------------------------------------------------- sayler - 28-Apr-06 18:16 ---------------------------------------------------------------------- I've had some time to look at this today, and stepping through dbmail-smpt (2087) the message is corrupted somewhere during insert_messages ()--not during e.g. _set_content_from_stream. Still investigating. call (char *)g_mime_object_to_string( msg->content) is your friend.. ---------------------------------------------------------------------- sayler - 28-Apr-06 18:23 ---------------------------------------------------------------------- The corruption occurs at the call to dbmail_message_set_header for the physmessage ID. Breakpoint 15, dbmail_message_set_header (self=0x80903d8, header=0x8065fad "X-DBMail-PhysMessage-ID", value=0x80948b0 "456648") at dbmail-message.c:433 investigating.. ---------------------------------------------------------------------- sayler - 28-Apr-06 19:57 ---------------------------------------------------------------------- This looks like a bug in gmime 2.1 My version of gmime is 2.1.14 (debian stable). Looking at Gmime's changelog, I see * gmime/gmime-parser.c (parser_step_headers): If we weren't able to find the end of the header, save it to our tmp buff before refilling our input buffer and set midline to TRUE. No need to check inptr < inend later because we know it to be true. (parser_step_headers): Append the raw header leftovers in the parser_fill() failure case. I *think* this is the issue I see--headers are being truncated at 4095 chars and then on the next pass through the partial header line is seen as invalid. I'm going to try to build against newew gmime and see if this helps. If this fixes it, we should reject GMime < 2.1.19. ---------------------------------------------------------------------- sayler - 28-Apr-06 20:27 ---------------------------------------------------------------------- OK, so 2.1.19 gmime fixes this. I know that Debian/stable is a target for dbmail 2.2, and I'm not sure how we're going to address this issue.. Thoughts? Issue History Date Modified Username Field Change ====================================================================== 25-Apr-06 00:01 sayler New Issue 25-Apr-06 00:01 sayler File Added: badmessage.txt 28-Apr-06 18:16 sayler Note Added: 0001113 28-Apr-06 18:23 sayler Note Added: 0001114 28-Apr-06 19:57 sayler Note Added: 0001115 28-Apr-06 20:27 sayler Note Added: 0001116 ======================================================================