Ticket #1483852 (closed Bugs: duplicate)

Opened 2 years ago

Last modified 8 months ago

E-mails aren´t delivered correctly - BAD E-MAIL HEADER

Reported by: cyril.dent Owned by:
Priority: 5 Milestone: 0.2-beta
Component: Client Scripts Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

When I send e-mail from webmail to another webmail account, it is delivered correctly. But after delivering to Microsoft Outlook or Outlook Express, it is bad delivered.

This is an example of delivered e-mail to outlook express:

From: (clear)
object: test
e-mail content:

Date: Mon, 19 Jun 2006 10:24:51 +0200
From: <info@…>
Message-ID: <aac450e19d847d2f8ba4c9145ebb8b8f@…>
X-Sender: info@…
User-Agent: RoundCube Webmail/0.1b
Content-Type: text/plain; charset="ISO-8859-2"
Content-Transfer-Encoding: 7bit

I´ve installed version 0.1-beta from 2006-02-19.

I think it´s problem of main.inc.php, it didn´t work.
For example: $rcmail_configmail_header_delimiter? = NULL; or ="\r\n" or ="|", after delivering = no change! :-(

E-mail header isn´t divided correctly.

E-mail source:

Return-Path: <info@…>
X-Original-To: sadlo@…
Delivered-To: sadlo@…
Received: by smtp.sadlo.cz (Postfix, from userid 33)
id 48D0410643EC; Wed, 21 Jun 2006 19:22:53 +0200(CEST)
To: sadlo@…
Subject: test
MIME-Version:1.0[[BR]] Date: Wed,21 Jun 2006 19:23:53 +0200 From: sadlo <info@…> Message-ID:<ba65babab6a5b5ababa65bab@…> X-Sender: info@… User-Agent:RoundCube Webmail/0.1b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Antivirus: AVG for E-mail 7.1.394 [268.9.2/370]

test

// I think bad CR/LF before "From: sadlo...."

Can you help me?

Attachments

badmail.jpg (192.7 kB) - added by carmachy 9 months ago.

Change History

  Changed 2 years ago by kwach

the same thing with gmail and evolution

about half of header is thrown into message content

  Changed 2 years ago by adriaan

  • version deleted

I'm using the default ISPConfig version, when I open the mail in Evolution it's display is correct. But some ISP's (like demon.nl) don't accept my headers: HEADER TYPE NOT SUPPORTED

  Changed 15 months ago by till

  • status changed from new to closed
  • resolution set to worksforme

I am closing this, if the problem perists please update from SVN first and then report back here.

  Changed 15 months ago by thomasb

This is a PHP mail() issue. Should be fixed in 0.1-rc1 which has auto-selection for header delimiters and also provides a config parameter to override this.

  Changed 10 months ago by mankytongue

  • status changed from closed to reopened
  • resolution deleted

This bug is still an issue in r955.

I've had a look at the headers in the sent email, and the problem seems to be the use of line breaks in the "References" header, for example in the following:

... Organization: Imperial College In-Reply-To: <652b30b70801210407v5b12fd74t35d25bb602f53f75@…> References: <652b30b70801181358r63099407wabf82d43e4e0514d@…> <479479D4.6040909@…> <214a6f6db48860b71048a0d0fec665fd@…> <652b30b70801210407v5b12fd74t35d25bb602f53f75@…> Message-ID: <c2e9aa657812eb073afe43711ac709c9@…> X-Sender: dtw107@… ...

Everything from <479479D4.6040909@…> onwards will appear in the message body. I think the headers should in fact be :

... Organization: Imperial College In-Reply-To: <652b30b70801210407v5b12fd74t35d25bb602f53f75@…> References: <652b30b70801181358r63099407wabf82d43e4e0514d@…> <479479D4.6040909@…> <214a6f6db48860b71048a0d0fec665fd@…> <652b30b70801210407v5b12fd74t35d25bb602f53f75@…> Message-ID: <c2e9aa657812eb073afe43711ac709c9@…> X-Sender: dtw107@… ...

(References is one line)

  Changed 9 months ago by seansan

mankytongue please retest with latest SVN or new release.

  Changed 9 months ago by seansan

  • version set to svn-trunk
  • milestone set to 0.1.5

Review in 0.1.5 (duplicates exist)

  Changed 9 months ago by seansan

  • milestone changed from 0.1.5 to 0.1.1

review in 0.1.1

  Changed 9 months ago by thomasb

Ticket #1484790 marked as duplicate of this bug

follow-up: ↓ 11   Changed 9 months ago by ghz

this minor modification solved the REFERENCES header issue for me. anyway it might be against the rfc as i do not really know the exact rules. anyway, what do you think about this kind of sanitization?

--- imap.inc.orig       Thu Feb 21 23:43:25 2008
+++ imap.inc    Thu Feb 21 23:47:15 2008
@@ -1638,7 +1638,7 @@
                                                $result[$id]->in_reply_to = ereg_replace("[\n<>]", '', $string);
                                                break;
                                        case 'references':
-                                               $result[$id]->references = $string;
+                                               $result[$id]->references = str_replace("\n", " ", $string);
                                                break;
                                        case 'return-receipt-to':
                                        case 'disposition-notification-to':

in reply to: ↑ 10   Changed 9 months ago by A321

This simple fix worked for me.. Now i'm able to have normal e-mail conversations with hotmail and gmail users :) , without header garbage everywhere

Replying to ghz:

this minor modification solved the REFERENCES header issue for me. anyway it might be against the rfc as i do not really know the exact rules. anyway, what do you think about this kind of sanitization? {{{ --- imap.inc.orig Thu Feb 21 23:43:25 2008 +++ imap.inc Thu Feb 21 23:47:15 2008 @@ -1638,7 +1638,7 @@ $result[$id]->in_reply_to = ereg_replace("[\n<>]", , $string); break; case 'references': - $result[$id]->references = $string; + $result[$id]->references = str_replace("\n", " ", $string); break; case 'return-receipt-to': case 'disposition-notification-to': }}}

  Changed 9 months ago by carmachy

I have the same problem. If I write a long subject and send into another mail address the mail is broken. Gmail shows the sender as unknown and in the mail I can see the header. Picture attached

Changed 9 months ago by carmachy

  Changed 9 months ago by till

  • milestone changed from 0.1.1 to 0.2-beta

Postponing it.

If you have the same issue, don't comment "me too". Please provide a sample message'''

  Changed 8 months ago by sky44

Why the bug will be fix in 0.2-beta ? The fix has been posted by ghz, so it is easy to fix it in the stable version 0.1 ? If not, I will do the fix after any update of roudcube until 0.2-beta...

  Changed 8 months ago by till

  • status changed from reopened to closed
  • resolution set to duplicate

Duplicate of #1484811

Note: See TracTickets for help on using tickets.