A NOTE has been added to this issue.
======================================================================
http://www.dbmail.org/mantis/view.php?id=326
======================================================================
Reported By: sayler
Assigned To:
======================================================================
Project: DBMail
Issue ID: 326
Category: PIPE delivery (dbmail-smtp)
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 17-Apr-06 23:14 CEST
Last Modified: 17-Apr-06 23:50 CEST
======================================================================
Summary: dbmail-smtp misparses simple message
Description:
I will attach a sample of a b0rken message. When this message is imported
with dbmail-smtp -d [EMAIL PROTECTED] it is misparsed. Specifically, some of
what is obviously body (comes after \n\n) is treated as a header, which is
then turned up as an X-Invalid-Header. The rest of the message is
preserved, after the bogus header line.
I'll look into this..
======================================================================
----------------------------------------------------------------------
sayler - 17-Apr-06 23:46
----------------------------------------------------------------------
Here's the problem, not sure what the solution is:
while ((t = g_mime_stream_buffer_gets(bstream,
buf, MESSAGE_MAX_LINE_SIZE))) {
if (strncmp(buf,"From ",5)==0)
g_mime_parser_set_scan_from(parser,TRUE);
if ((type==DBMAIL_STREAM_LMTP) &&
(strncmp(buf,".\r\n",3)==0))
break;
g_mime_stream_write_string(mstream, buf);
}
g_free(buf);
in dbmail-message.c (there's a similar call in dbmail-mailbox.c) we handle
>From line (e.g. mbox) handling. Unfortunately, this parsing happens even
if the From appears in the body!
Essentially, we need to be able to write
if (in_header && strncmp(buf,"From ",5)==0)
And expand the LMTP test below to look for the header boundry always..
Working it..
----------------------------------------------------------------------
sayler - 17-Apr-06 23:50
----------------------------------------------------------------------
Attaching a bog simple fix..
Issue History
Date Modified Username Field Change
======================================================================
17-Apr-06 23:14 sayler New Issue
17-Apr-06 23:14 sayler File Added: badmailtest.txt
17-Apr-06 23:15 sayler File Added: badmailtest.log5.txt
17-Apr-06 23:46 sayler Note Added: 0001084
17-Apr-06 23:50 sayler Note Added: 0001085
======================================================================