A NOTE has been added to this issue. ====================================================================== http://www.dbmail.org/mantis/view.php?id=396 ====================================================================== Reported By: Maria Assigned To: ====================================================================== Project: DBMail Issue ID: 396 Category: LMTP daemon Reproducibility: always Severity: minor Priority: normal Status: new target: ====================================================================== Date Submitted: 18-Aug-06 16:35 CEST Last Modified: 03-Oct-06 13:48 CEST ====================================================================== Summary: Forwarded messages arrive with their headers in the body of the email Description: I am using Qmail + Dbmail so the sendmail program is qmail's sendmail. When a user has a forwarding address set the message arrives at the destination with all the headers in the body of the message and an extra newline between each header (which is probably why the recepient client displays them in the body).
i.e. a forwarded message looks as follows: (even though it arrives ok to the local mailbox and displayed properly from there) Date: 18 Aug 2006 15:11:48 +0100 Message-ID: <[EMAIL PROTECTED]> From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Test X-DSPAM-Result: Innocent X-DSPAM-Processed: Fri Aug 18 15:11:48 2006 X-DSPAM-Confidence: 0.9898 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 54,44e5caa4131891968313023 X-DBMail-PhysMessage-ID: 4021136 MIME-Version: 1.0 Test2 The following is a level 5 trace for the message delivery: Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Info pipe.c, send_forward_list: delivering to [1] external addresses Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Debug pipe.c, send_mail: sendmail command is [/usr/sbin/sendmail] Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Info pipe.c, send_mail: opening pipe to [/usr/sbin/sendmail -f [EMAIL PROTECTED] [EMAIL PROTECTED] Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Debug pipe.c, send_mail: pipe opened Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Debug db.c,db_send_message_lines: request for [-2] lines Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Debug dbmysql.c,db_query: query [SELECT physmessage_id FROM dbmail_messages WHERE message_idnr = '8051314'] Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Debug db.c,db_send_message_lines: sending [-2] lines from message [8051314] Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Debug dbmysql.c,db_query: query [SELECT messageblk FROM dbmail_messageblks WHERE physmessage_id = '4021142' ORDER BY messageblk_idnr] Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Debug dbmail-message.c,_set_content_from_stream: parse message Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Debug pipe.c, send_mail: pipe closed Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Info sendmail exited normally Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Debug dbmysql.c,db_query: query [SELECT physmessage_id FROM dbmail_messages WHERE message_idnr = '8051313'] Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Debug dbmysql.c,db_query: query [DELETE FROM dbmail_messages WHERE message_idnr = '8051313'] Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Debug dbmysql.c,db_query: query [SELECT message_idnr FROM dbmail_messages WHERE physmessage_id = '4021142'] Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Debug pipe.c, insert_messages: temporary message deleted from database. Done. Aug 18 15:14:23 mail2 dbmail/lmtpd[21152]: Debug dbmysql.c,db_query: query [COMMIT] ====================================================================== ---------------------------------------------------------------------- aaron - 02-Oct-06 21:25 ---------------------------------------------------------------------- It's a qmail thing. http://bugs.php.net/bug.php?id=15841 ---------------------------------------------------------------------- paul - 03-Oct-06 08:06 ---------------------------------------------------------------------- Aaron, Are you sure? Shouldn't we do crlf->lf before feeding the message to the pipe? ---------------------------------------------------------------------- aaron - 03-Oct-06 09:43 ---------------------------------------------------------------------- How we accepted CRLF caused enormous drama on the way to 2.0. I don't want to repeat that with how to generate CRLF. Every other MTA is quite happy to accept CRLF's as well as LF's. Stripping all CR's before things hit the pipe would probably not cause harm to the other MTA's, and would be what Qmail expects. But then there's the issue of things that aren't sendmail, when the deliver_to begins with | and !. I am leery of starting any drama here. I would be much happier if there were a Qmail patch distribution that already had a patch in place to fix this. We could just declare that it is required for DBMail+Qmail to work. If we need to work around this on our side, we could use a config option, something like [DBMAIL] SENDMAIL = /usr/bin/sendmail # This option is there already. SENDMAIL_NEWLINES = lf / crlf # But would this also apply to !/| pipes? Ok, there's tossing some wet noodles at the wall. Let's see what sticks. ---------------------------------------------------------------------- paul - 03-Oct-06 13:48 ---------------------------------------------------------------------- Maria, The php bug history also shows a usable work-a-round: could you please test: SENDMAIL="dos2unix|/usr/sbin/sendmail" in dbmail.conf Issue History Date Modified Username Field Change ====================================================================== 18-Aug-06 16:35 Maria New Issue 18-Aug-06 16:36 Maria Issue Monitored: Maria 02-Oct-06 21:25 aaron Note Added: 0001436 03-Oct-06 08:06 paul Note Added: 0001437 03-Oct-06 09:43 aaron Note Added: 0001438 03-Oct-06 13:48 paul Note Added: 0001440 ======================================================================
