The following issue has been set as RELATED TO issue 0000213. 
====================================================================== 
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:                   feature
Priority:                   low
Status:                     confirmed
====================================================================== 
Date Submitted:             25-Apr-06 00:01 CEST
Last Modified:              05-May-06 20:33 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..)
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0000213 pop3d sends SIGKILL to init's process g...
====================================================================== 

---------------------------------------------------------------------- 
 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? 

---------------------------------------------------------------------- 
 paul - 30-Apr-06 10:20  
---------------------------------------------------------------------- 
I'm setting this bug to low-prio and suspended since it's not a dbmail
issue perse. As long as gmime-2.1.19+ is used, this issue is moot. 

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                          
30-Apr-06 10:20 paul           Note Added: 0001137                          
30-Apr-06 10:20 paul           Priority                 normal => low       
30-Apr-06 10:20 paul           Status                   new => confirmed    
30-Apr-06 10:20 paul           Resolution               open => suspended   
30-Apr-06 10:20 paul           Severity                 major => feature    
05-May-06 20:33 paul           Relationship added       related to 0000213  
======================================================================

Reply via email to