Message not displaying in SM 1.4.4 and HM4.0 B121

Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
Post Reply
gabrielharrison
Normal user
Normal user
Posts: 61
Joined: 2004-12-13 15:40

Message not displaying in SM 1.4.4 and HM4.0 B121

Post by gabrielharrison » 2005-07-19 18:04

Hi,

I have a an email that displays fine in OE and thunderbird but not in SM. What I don't know is if the email is not formatted properly or I have uncovered a bug in SM or HM. I have included the message below direct from the file in the HM data directory and replaced sensetive information.

I get the following PHP notice in SM: Notice: Array to string conversion in D:\Personal_Documents\websites\ghserver.co.uk\current\squirrelmail\functions\mime.php on line 400

and when I download it, it gets the extension .array but downloads OK.

Any ideas?

Regards Gabriel

Return-Path: <xxx@xxx.xxx>
Delivery-Date: Mon, 18 Jul 2005 20:32:11 +0200
Received: from [195.245.231.163] (helo=mail114.messagelabs.com)
by mxeu3.kundenserver.de with ESMTP (Nemesis),
id 0MKqIe-1DuaPT1uSh-000852 for xxx@xxx.xxx; Mon, 18 Jul 2005 20:32:11 +0200
X-VirusChecked: Checked
X-Env-Sender: xxx@xxx.xxx
X-Msg-Ref: server-8.tower-114.messagelabs.com!1121711530!11498868!1
X-StarScan-Version: 5.4.15; banners=-,-,-
X-Originating-IP: [80.169.1.81]
Received: (qmail 17376 invoked from network); 18 Jul 2005 18:32:10 -0000
Received: from unknown (HELO coloms.mpsgi.com) (80.169.1.81)
by server-8.tower-114.messagelabs.com with SMTP; 18 Jul 2005 18:32:10 -0000
Received: from colo-smtp.mpsgi.com (colo-smtp.mpsgi.com) by coloms.mpsgi.com
(Clearswift SMTPRS 5.1.4) with ESMTP id
<T7237d812d2c0a811c610cc@coloms.mpsgi.com> for
<xxx@xxx.xxx>; Mon, 18 Jul 2005 19:32:59 +0100
Received: by colo-smtp.mpsgi.com with Internet Mail Service (5.5.2657.72) id
<3CRLJ1XN>; Mon, 18 Jul 2005 19:32:09 +0100
Message-ID: <C61D22612EE38F44A5AA10CD2F6BCADE03A7A6E0@hilly.mpsgi.com>
From: Modis Timesheet Invoice <xxx@xxx.xxx>
To: "'xxx@xxx.xxx'" <xxx@xxx.xxx>
Subject: Private and Confidential: Automatic Notification from Modis Inter
national
Date: Mon, 18 Jul 2005 19:32:06 +0100
Return-Receipt-To: Modis Timesheet Invoice <xxx@xxx.xxx>
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2657.72)
Content-Type: multipart/alternative; boundary=
"----_=_NextPart_001_01C58BC6.FFD8280E"
Envelope-To: xxx@xxx.xxx

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C58BC6.FFD8280E
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

Body text

------_=_NextPart_001_01C58BC6.FFD8280E
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version 5.5.2657.73">
<TITLE>xxx</TITLE>
</HEAD>
<BODY>
message body
</BODY>
</HTML>

------_=_NextPart_001_01C58BC6.FFD8280E--

cmurphy54
Senior user
Senior user
Posts: 550
Joined: 2004-09-25 22:11
Location: Atlanta, GA
Contact:

Post by cmurphy54 » 2005-07-19 18:13

v4.0 B125 is out and marked as stable, so first off, you should probably upgrade and see if you still have the problem. This seems more like a SM issue than a hMailServer error though.

On a side note, I'm contracting through Modis on my current project too!

brudosm
New user
New user
Posts: 9
Joined: 2005-05-13 17:19

Post by brudosm » 2005-07-19 22:21

I have a similar problem with an order confirmation email generated by Mambo phpShop - it looks fine in Thunderbird, but Nothing is displayed in the email body. Order change emails from Mambo look fine however - so I suspect it's a SM problem.

User avatar
FAWTS
Normal user
Normal user
Posts: 74
Joined: 2005-06-18 15:25
Location: Paris
Contact:

Post by FAWTS » 2005-07-19 23:33

check if Show mail with HTML format by default is on YES in the options!
Apache 1.3.33 PHP Version 4.4 hMailServer 4.1-B136 OS : Win XP SP2 AV : ClamAV 0.86.1

gabrielharrison
Normal user
Normal user
Posts: 61
Joined: 2004-12-13 15:40

Post by gabrielharrison » 2005-07-20 12:16

I've just checked the SM HTML option and it doesn't make any difference so I'll try upgrading to the latest HM build later this week.

If that doesn't work I guess I'll just have to do some proper SM debugging! Can anyone confirm that the message format is OK?

cmurphy54 do you have the same problem with your automatic emails from modis?

Gabriel

User avatar
martin
Developer
Developer
Posts: 6837
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2005-07-20 12:24

To me the message looks fine. If it doesn't work in 4.0 I can debug it for you. I think I'll find it easier since I've debugged SquirrelMail/hMailServer/message formats some times before..

gabrielharrison
Normal user
Normal user
Posts: 61
Joined: 2004-12-13 15:40

Post by gabrielharrison » 2005-07-20 12:37

:)

OK I'll let you know.

Gabriel

gabrielharrison
Normal user
Normal user
Posts: 61
Joined: 2004-12-13 15:40

Post by gabrielharrison » 2005-07-20 21:41

I've just upgraded to the latest HM build and I get the same php notice and the message doesn't get displayed.

You also get a few more notices the first time you look at the message when loging in to SM. The notices are:

Notice: Undefined offset: 4 in D:\Personal_Documents\websites\ghserver.co.uk\current\squirrelmail\class\mime\Message.class.php on line 319

Notice: Undefined offset: 5 in D:\Personal_Documents\websites\ghserver.co.uk\current\squirrelmail\class\mime\Message.class.php on line 320

Notice: Undefined offset: 6 in D:\Personal_Documents\websites\ghserver.co.uk\current\squirrelmail\class\mime\Message.class.php on line 322

Gabriel

User avatar
martin
Developer
Developer
Posts: 6837
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2005-07-20 21:42

Uhm, you aren't using PHP 5, are you?

gabrielharrison
Normal user
Normal user
Posts: 61
Joined: 2004-12-13 15:40

Post by gabrielharrison » 2005-07-20 22:31

Hi Martin,

I'm using version 4: Apache/2.0.46 (Win32) PHP/4.3.2

Gabriel

User avatar
martin
Developer
Developer
Posts: 6837
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2005-07-20 23:03

The email message you posted above, is that the entire contents of the eml-file?

Perhaps you can zip the eml file and send it to me at martin@hmailserver.com?

User avatar
martin
Developer
Developer
Posts: 6837
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2005-07-20 23:11

Nevermind, I could reproduce it now.. hang on..

User avatar
martin
Developer
Developer
Posts: 6837
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2005-07-20 23:59

This is a bug in the MIME decoder hMailServer is using.

hMailServer apparantly do not handle one type of Content-Type header field properly. Content-type header fields normally looks like this:

Code: Select all

Content-Type: multipart/alternative; 
   boundary= "----_=_NextPart_001_01C58BC6.FFD8280E" 

or

Content-Type: multipart/alternative; boundary= "Something" 
But when they look like this, hMailServer can't parse it.

Code: Select all

Content-Type: multipart/alternative; boundary=
   "Something" 
I would say that the MIME RFC is quite unclear on this. Using Google group search I found a couple of people wondering whether that syntax is allowed. This has never worked in hMailServer, so I assume that syntax is used almost never. Anyway, according to some guys in some forum I found, the syntax is valid...

In the mime-decoder there were lines that should handle this syntax, but they were commented out and not used. I've written in the forum for the MIME-decoder and asked them why the lines are commented out.

If they dont' reply to my question, I'll just fix it myself (since I got the source to the mime decoder)

gabrielharrison
Normal user
Normal user
Posts: 61
Joined: 2004-12-13 15:40

Post by gabrielharrison » 2005-09-19 13:07

Hi Martin,

Did anyone get back to you on the lines that were commented out? If the header syntax works in the latest HM4.1 build I'll upgrade my server.

Gabriel

Post Reply