IMAP Problems

Use this forum if you want to discuss a problem or ask a question related to a hMailServer beta release.
Post Reply
bth
New user
New user
Posts: 4
Joined: 2006-10-23 17:05
Location: Danmark

IMAP Problems

Post by bth » 2006-10-23 17:30

Hi all.

I just testing the hMailserver with some Nokia E61's (using 3g) connected
to the server through IMAP with idle, because i want to use this as an
alternative to a blackberry server.

I have experienced that the mails arrives on the the Nokia E61, but
i only see the Subject field, the From field is just blank.

When you then wants to read the mail, the From files is updated.
I tried with some other devices and the have the same problem.

We already use the Nokia E61 with a Exchange 2003/2007 and a
SuSE Mail server and that works fine.

I have tested it on the following versions.
hMailServer 4.3 - Build 241 (145) - 2006-10-20
hMailServer 4.3 - Build 239 (211) - 2006-10-13

I don't know if i have the same issue on a stable version.

It this a know issue, or any idea how to solve it?

\Brian

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

Post by martin » 2006-10-23 17:32

Not a known issue. Could you enable IMAP logging in hMailServer, reproduce the problem once and then post the log here?

bth
New user
New user
Posts: 4
Joined: 2006-10-23 17:05
Location: Danmark

Post by bth » 2006-10-23 18:01

This from the log file.
-------------------------------------------------------------------------------------


"IMAPD" 3652 49 "2006-10-23 17:45:22.240" "80.251.195.2" "SENT: * 7 EXISTS[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:25.384" "80.251.195.2" "RECEIVED: DONE"
"IMAPD" 2332 49 "2006-10-23 17:45:25.384" "80.251.195.2" "SENT: 33 OK IDLE terminated[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:25.544" "80.251.195.2" "RECEIVED: 34 UID FETCH 1:438 (UID FLAGS)"
"IMAPD" 2332 49 "2006-10-23 17:45:25.544" "80.251.195.2" "SENT: * 1 FETCH (UID 433 FLAGS (\Seen))[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:25.544" "80.251.195.2" "SENT: * 2 FETCH (UID 434 FLAGS (\Seen))[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:25.544" "80.251.195.2" "SENT: * 3 FETCH (UID 435 FLAGS ())[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:25.544" "80.251.195.2" "SENT: * 4 FETCH (UID 436 FLAGS ())[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:25.544" "80.251.195.2" "SENT: * 5 FETCH (UID 437 FLAGS ())[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:25.544" "80.251.195.2" "SENT: * 6 FETCH (UID 438 FLAGS ())[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:25.544" "80.251.195.2" "SENT: 34 OK UID completed[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:26.145" "80.251.195.2" "RECEIVED: 35 UID FETCH 439:* (UID FLAGS BODYSTRUCTURE BODY.PEEK[HEADER.FIELDS (Received Date Subject From Priority X-Priority X-MSMail-Priority Importance Precedence)])"
"IMAPD" 2332 49 "2006-10-23 17:45:26.145" "80.251.195.2" "SENT: * 7 FETCH (UID 439 FLAGS () BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1") NIL NIL "7bit" 10 1)("TEXT" "HTML" ("CHARSET" "ISO-8859-1") NIL NIL "7bit" 10 1) "ALTERNATIVE" ("BOUNDARY" "----=_Part_191729_11077197.1161618613761") NIL NIL) BODY[HEADER.FIELDS (RECEIVED DATE SUBJECT FROM PRIORITY X-PRIORITY X-MSMAIL-PRIORITY IMPORTANCE PRECEDENCE)] {220}[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:26.145" "80.251.195.2" "SENT: )[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:26.145" "80.251.195.2" "SENT: 35 OK UID completed[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:26.806" "80.251.195.2" "RECEIVED: 36 UID STORE 438 +FLAGS (\Seen)"
"IMAPD" 2332 49 "2006-10-23 17:45:26.806" "80.251.195.2" "SENT: * 6 FETCH (FLAGS (\Seen) UID 438)[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:26.806" "80.251.195.2" "SENT: 36 OK UID completed[nl]"
"IMAPD" 2332 49 "2006-10-23 17:45:27.357" "80.251.195.2" "RECEIVED: 37 IDLE"
"IMAPD" 2332 49 "2006-10-23 17:45:27.357" "80.251.195.2" "SENT: + idling[nl]"

-------------------------------------------------------------------------------------

\Brian

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

Post by martin » 2006-10-23 19:40

The log shows that your client requests the From address and hMailServer responds to that request. :-\

Does it happen with all messages or only some of them?

bth
New user
New user
Posts: 4
Joined: 2006-10-23 17:05
Location: Danmark

Post by bth » 2006-10-23 20:09

Most mail received is without "From" information,
but some is complete.

For example the mail i received from hmailserver.com regarding
the forum update was displayed on my E61 correctly.

It might sound strange, but it seems link only mails with From addresses with a certain amount of characters are displayed correct.

I will try if investigate that further.

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

Post by martin » 2006-10-23 20:10

Could it be when addresses contains a certain set of characters?

For example if the "From" header contains " or <?

nikolajhendel
New user
New user
Posts: 24
Joined: 2006-04-03 22:16

Post by nikolajhendel » 2006-10-26 10:48

Hi
Just wanted to "lend my support". I have the exact same problem with the nokia E60. Most mails only show subject and not sender.
Sender pops up when message is downloaded.

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

Post by martin » 2006-10-26 20:18

I won't get any further with that info. See my previous question. :)

bth
New user
New user
Posts: 4
Joined: 2006-10-23 17:05
Location: Danmark

Post by bth » 2006-10-29 23:49

Hi Martin.

I'm sure it has something to do with the "characters" in the mail
header, but unfortunately i don't see what the problem is.

I have several examples to look at, so i will post some that
works an some that don't work a little later today

Then you might See whats wrong.

\Brian

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Post by dzekas » 2006-10-30 07:43

Could you take a look at email source and show From: header of email that is displayed correctly and header of email that is not displayed correctly.

nikolajhendel
New user
New user
Posts: 24
Joined: 2006-04-03 22:16

Post by nikolajhendel » 2006-10-30 20:00

I seem to have found a consistency in what gets shown - and what not:
when the from header is formatted with "" around the name, sender is shown - fx.:
From: "informing" <zbigauqwx@osburn.net>

when from header doesnt contain "", sender doesn't show - fx.:
From: Harry <Florence@chronoexpres.com>

Don't think this is a problem with hmailserver. As soon as I download the full email, sender is shown i the E60 email client.

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

Post by martin » 2006-10-30 20:26

Could perhaps be that E60 requires the From header to be encoded in some way when it downloads it. If I provide you with a new test build where I have made a change to the encoding of this field, do you have the possibility to test it?

nikolajhendel
New user
New user
Posts: 24
Joined: 2006-04-03 22:16

Post by nikolajhendel » 2006-10-30 22:33

yup - I can give it a spin

lrosen
New user
New user
Posts: 8
Joined: 2006-08-02 22:09

and the solution is ...

Post by lrosen » 2006-10-31 10:15

... the Nokia thing interprets the server response in a case-sensitive way. It shouldn't, but it does ...

It works fine when the response is reformatted to read

Code: Select all

... BODY[HEADER.FIELDS (Received Date Subject From Priority X-Priority X-MSMail-Priority Importance Precedence)]) ...
To fix it in code, remove the .ToUpper() call from

Code: Select all

  IMAPFetchParser::_ParseBODY
as well as from (a similar issue)

Code: Select all

  IMAPFetch::_IteratePartRecursive
  IMAPFetch::_GetPartStructure

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

Post by martin » 2006-10-31 11:05

Really? Thanks for the feedback!

Then the phone is buggy. That information should not be case sensitive. I'll see if I can modify hMailServer for 4.3 so that this issue is resolved. (I can't just replace Remove "ToUpper()", then the Replace() on the next line will fail in some cases. But I'll see what I can do to resolve it.

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

Post by martin » 2006-10-31 12:47

I've "fixed" the first one. Created a new search/replace method which is in case insensitive. But are you really sure about the second and third though? These two ToUpper() just modifies a mainpart/subjtype string, such as text/html or text/plain. I can't see how those two would have anything to do with this issue?

lrosen
New user
New user
Posts: 8
Joined: 2006-08-02 22:09

Post by lrosen » 2006-11-03 11:34

martin wrote:These two ToUpper() just modifies a mainpart/subjtype string, such as text/html or text/plain. I can't see how those two would have anything to do with this issue?
Same thing. Some clients (can't remember which) don't like responses like

Code: Select all

* 1 FETCH (BODYSTRUCTURE (("TEXT" "PLAIN" ...
and work better with

Code: Select all

* 1 FETCH (BODYSTRUCTURE (("text" "plain" ...

Lord-M
New user
New user
Posts: 8
Joined: 2007-09-24 01:47

Re: IMAP Problems

Post by Lord-M » 2008-09-24 16:16

Sorry to kick this old topic, but I seem to be having a very much related problem...

Running hMailServer 4.4 (Build 270) and trying to use a Nokia E71 to view my IMAP inbox.

When checking for new message, only the "Subject" field is filled, the "From" field is blank. If I read/download a message, the "From" field gets filled properly. Similar to the original problem.

The strange thing is that some messages due get their "From" field filled out right away... The factor that seems to influence this is the presence of double-quote characters in the "From" field.

If the "From" field is formatted as Some Name<some.name@example.com> it gets displayed properly, if instead it is "Some Name"<some.name@example.com>, it doesn't...

Is this anything that might be related to hMailServer, or did Nokia again screw up their e-mail client?
Last edited by Lord-M on 2008-09-24 22:33, edited 1 time in total.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: IMAP Problems

Post by ^DooM^ » 2008-09-24 17:22

"Some Name<some.name@example.com>" is an invalid email address. Most clients handle this well but I am assuming nokia's client does not.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

Lord-M
New user
New user
Posts: 8
Joined: 2007-09-24 01:47

Re: IMAP Problems

Post by Lord-M » 2008-09-24 22:36

Whoops, my bad: I meant to write: "Some Name"<some.name@example.com>...

Although this is also not entirely correct (if I remember correctly quotes should only be used if there are control characters in the name) it shouldn't pose a problem, or should it?

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

Re: IMAP Problems

Post by martin » 2008-09-24 23:01

Can you enable IMAP logging, reproduce the problem and post the log here from when you access the mailbox? :-\
Kind of hard to tell where the problem is without seeing an example of the communication when it goes wrong. (An IMAP client can use more than one method to retrieve headers)

Lord-M
New user
New user
Posts: 8
Joined: 2007-09-24 01:47

Re: IMAP Problems

Post by Lord-M » 2008-09-25 01:05

This is what happens when the Nokia client logs in and a new message is present in the IMAP inbox:

=======================================================================

"IMAPD" 2428 6506 "2008-09-25 00:53:39.046" "62.140.137.125" "SENT: 2 OK LOGIN completed"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.202" "62.140.137.125" "RECEIVED: 3 SELECT "INBOX""
"IMAPD" 2428 6506 "2008-09-25 00:53:39.234" "62.140.137.125" "SENT: * 9 EXISTS[nl]* 1 RECENT[nl]* FLAGS (\Deleted \Seen \Draft \Answered \Flagged)[nl]* OK [UIDVALIDITY 0][nl]* OK [UNSEEN 28835][nl]* OK [PERMANENTFLAGS (\Deleted \Seen \Draft \Answered \Flagged)][nl]3 OK [READ-WRITE] SELECT completed"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.343" "62.140.137.125" "RECEIVED: 4 UID FETCH 1:28395 (UID FLAGS)"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.343" "62.140.137.125" "SENT: * 1 FETCH (UID 23632 FLAGS (\Seen))"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.343" "62.140.137.125" "SENT: * 2 FETCH (UID 24511 FLAGS (\Seen))"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.343" "62.140.137.125" "SENT: * 3 FETCH (UID 26286 FLAGS (\Seen))"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.343" "62.140.137.125" "SENT: * 4 FETCH (UID 26571 FLAGS (\Seen))"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.343" "62.140.137.125" "SENT: * 5 FETCH (UID 27035 FLAGS (\Seen))"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.343" "62.140.137.125" "SENT: * 6 FETCH (UID 27590 FLAGS (\Answered \Seen))"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.343" "62.140.137.125" "SENT: * 7 FETCH (UID 28076 FLAGS (\Seen))"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.343" "62.140.137.125" "SENT: * 8 FETCH (UID 28395 FLAGS (\Answered \Seen))"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.343" "62.140.137.125" "SENT: 4 OK UID completed"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.796" "62.140.137.125" "RECEIVED: 5 UID FETCH 28396:* (UID FLAGS BODYSTRUCTURE BODY.PEEK[HEADER.FIELDS (Received Date Subject From Priority X-Priority X-MSMail-Priority Importance)])"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.796" "62.140.137.125" "SENT: * 9 FETCH (UID 28835 FLAGS () BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "7bit" 32 6)("TEXT" "HTML" ("CHARSET" "us-ascii") NIL NIL "quoted-printable" 3895 104) "ALTERNATIVE" ("BOUNDARY" "----=_NextPart_000_00A0_01C91EA9.2B71BBB0") NIL NIL) BODY[HEADER.FIELDS (Received Date Subject From Priority X-Priority X-MSMail-Priority Importance)] {232}"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.812" "62.140.137.125" "SENT: )"
"IMAPD" 2428 6506 "2008-09-25 00:53:39.812" "62.140.137.125" "SENT: 5 OK UID completed"
"IMAPD" 2428 6506 "2008-09-25 00:53:40.265" "62.140.137.125" "RECEIVED: 6 LIST "" "%""
"IMAPD" 2428 6506 "2008-09-25 00:53:40.265" "62.140.137.125" "SENT: * LIST (\HasNoChildren) "." INBOX[nl]* LIST (\HasNoChildren) "." "Junk E-mail"[nl]* LIST (\HasNoChildren) "." "Sent Items""
"IMAPD" 2428 6506 "2008-09-25 00:53:40.265" "62.140.137.125" "SENT: 6 OK LIST completed"
"IMAPD" 2428 6506 "2008-09-25 00:53:40.702" "62.140.137.125" "RECEIVED: 7 LIST "" "INBOX.%""
"IMAPD" 2428 6506 "2008-09-25 00:53:40.702" "62.140.137.125" "SENT: 7 OK LIST completed"
"IMAPD" 2428 6506 "2008-09-25 00:53:40.905" "62.140.137.125" "RECEIVED: 8 LIST "" "Junk E-mail.%""
"IMAPD" 2428 6506 "2008-09-25 00:53:40.905" "62.140.137.125" "SENT: 8 OK LIST completed"
"IMAPD" 2428 6506 "2008-09-25 00:53:41.015" "62.140.137.125" "RECEIVED: 9 LIST "" "Sent Items.%""
"IMAPD" 2428 6506 "2008-09-25 00:53:41.015" "62.140.137.125" "SENT: 9 OK LIST completed"
"IMAPD" 2428 6506 "2008-09-25 00:53:41.140" "62.140.137.125" "RECEIVED: 10 IDLE"
"IMAPD" 2428 6506 "2008-09-25 00:53:41.140" "62.140.137.125" "SENT: + idling"

=======================================================================

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

Re: IMAP Problems

Post by martin » 2008-09-25 22:25

Not sure, but looks like the problem is in the Nokia. When an IMAP client accesses a mailbox, it can either ask the server to parse the header, or it can parse the header itself. In your case, the phone doesn't ask hMailServer to parse the header, it just asks for the raw "From" header. So if the problem only occurs if the From header is incorrectly formatted, I'm guessing the problem is with the phone and not with hMailServer (since it's the phone which does the parsing and should handle the case that it's incorrectly formatted). :-\

One way to determine it for sure would be to actually intercept the TCP/IP communication, for example using Wireshark, to confirm that hMailServer does in fact send the From header to the client. I mean, there could be a bug in hMailServer which makes it fail sending the header to the client. (I did test this though and in my environment the incorrectly formatted header was sent to the client.)

Lord-M
New user
New user
Posts: 8
Joined: 2007-09-24 01:47

Re: IMAP Problems

Post by Lord-M » 2008-09-26 02:58

I've done some snooping around with Wireshark... The situation is the same as before: There is one unread message in my inbox, sent via Gmail to the hMailServer.

When the Nokia client connects and updates its list of messages this happens:

Code: Select all

Frame 11 (216 bytes on wire, 216 bytes captured)
====================================
Internet Message Access Protocol
    5 UID FETCH 28396:* (UID FLAGS BODYSTRUCTURE BODY.PEEK[HEADER.FIELDS (Received Date Subject From Priority X-Priority X-MSMail-Priority Importance)])\r\n
        Request Tag: 5
        Request: UID FETCH 28396:* (UID FLAGS BODYSTRUCTURE BODY.PEEK[HEADER.FIELDS (Received Date Subject From Priority X-Priority X-MSMail-Priority Importance)])

Frame 12 (415 bytes on wire, 415 bytes captured)
====================================
Internet Message Access Protocol
    [truncated] * 9 FETCH (UID 29005 FLAGS () BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1") NIL NIL "7bit" 7 1)("TEXT" "HTML" ("CHARSET" "ISO-8859-1") NIL NIL "7bit" 32 1) "ALTERNATIVE" ("BOUNDARY" "----=_Part_13602_26282888.12223884
        Response Tag: *
        [truncated] Response: 9 FETCH (UID 29005 FLAGS () BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1") NIL NIL "7bit" 7 1)("TEXT" "HTML" ("CHARSET" "ISO-8859-1") NIL NIL "7bit" 32 1) "ALTERNATIVE" ("BOUNDARY" "----=_Part_13602_26282888.

Frame 13 (337 bytes on wire, 337 bytes captured)
====================================
Internet Message Access Protocol
    Received: from mail-gx0-f19.google.com ([209.85.217.19]) by ********** with hMailServer ; Fri, 26 Sep 2008 02:20:05 +0200\r\n
        Response Tag: Received:
        Response: from mail-gx0-f19.google.com ([209.85.217.19]) by ********** with hMailServer ; Fri, 26 Sep 2008 02:20:05 +0200
    Date: Fri, 26 Sep 2008 02:21:09 +0200\r\n
        Response Tag: Date:
        Response: Fri, 26 Sep 2008 02:21:09 +0200
    Subject: Testing Testing Testing...\r\n
        Response Tag: Subject:
        Response: Testing Testing Testing...
    From: "Some Name" <me@gmail.com>\r\n
        Response Tag: From:
        Response: "Some Name" <me@gmail.com>
    )\r\n
        Response Tag: )
    5 OK UID completed\r\n
        Response Tag: 5
        Response: OK UID completed
The message is now listed on the screen and the "From" field is empty... I now "click" on the message to view its contents. The following happens:

Code: Select all

Frame 27 (344 bytes on wire, 344 bytes captured)
====================================
Internet Message Access Protocol
    [truncated] 11 UID FETCH 29005 (UID FLAGS BODYSTRUCTURE BODY.PEEK[HEADER.FIELDS (Received Date Subject From Reply-to To Cc Bcc Message-ID Return-Receipt-To X-Return-Receipt-To Disposition-Notification-To Disposition-Notification-Options Pr
        Request Tag: 11
        [truncated] Request: UID FETCH 29005 (UID FLAGS BODYSTRUCTURE BODY.PEEK[HEADER.FIELDS (Received Date Subject From Reply-to To Cc Bcc Message-ID Return-Receipt-To X-Return-Receipt-To Disposition-Notification-To Disposition-Notification-Opti

Frame 28 (544 bytes on wire, 544 bytes captured)
====================================
Internet Message Access Protocol
    [truncated] * 9 FETCH (UID 29005 FLAGS () BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1") NIL NIL "7bit" 7 1)("TEXT" "HTML" ("CHARSET" "ISO-8859-1") NIL NIL "7bit" 32 1) "ALTERNATIVE" ("BOUNDARY" "----=_Part_13602_26282888.12223884
        Response Tag: *
        [truncated] Response: 9 FETCH (UID 29005 FLAGS () BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1") NIL NIL "7bit" 7 1)("TEXT" "HTML" ("CHARSET" "ISO-8859-1") NIL NIL "7bit" 32 1) "ALTERNATIVE" ("BOUNDARY" "----=_Part_13602_26282888.

Frame 29 (433 bytes on wire, 433 bytes captured)
====================================
Internet Message Access Protocol
    Received: from mail-gx0-f19.google.com ([209.85.217.19]) by ********** with hMailServer ; Fri, 26 Sep 2008 02:20:05 +0200\r\n
        Response Tag: Received:
        Response: from mail-gx0-f19.google.com ([209.85.217.19]) by ********** with hMailServer ; Fri, 26 Sep 2008 02:20:05 +0200
    Date: Fri, 26 Sep 2008 02:21:09 +0200\r\n
        Response Tag: Date:
        Response: Fri, 26 Sep 2008 02:21:09 +0200
    Subject: Testing Testing Testing...\r\n
        Response Tag: Subject:
        Response: Testing Testing Testing...
    From: "Some Name" <me@gmail.com>\r\n
        Response Tag: From:
        Response: "Some Name" <me@gmail.com>
    To: me@**********\r\n
        Response Tag: To:
        Response: me@**********
    Message-ID: <fd3b09a0809251721s2e6d7bach31d228b6477a2768@mail.gmail.com>\r\n
        Response Tag: Message-ID:
        Response: <fd3b09a0809251721s2e6d7bach31d228b6477a2768@mail.gmail.com>
    )\r\n
        Response Tag: )
    11 OK UID completed\r\n
        Response Tag: 11
        Response: OK UID completed
(The message body follows, but I'm guessing that's not the problem :)

The Nokia now client displays the message including the correct "From" field. When I go back to the initial message list, the "From" field is also filled.

There seems to be no significant difference between the two responses, or is there?

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

Re: IMAP Problems

Post by martin » 2008-09-26 09:43

Not as far as I can tell. I don't think your log is complete though, since I can't see any request of the actual message content (the body) in the second log snippet which is created when you click on the email.

You said the problem occurred if the From address was ""Some Name"<me@gmail.com>" but your wireshark log shows it being "Some Name" <me@gmail.com>? Is this a typo in your log, or?

Lord-M
New user
New user
Posts: 8
Joined: 2007-09-24 01:47

Re: IMAP Problems

Post by Lord-M » 2008-09-26 14:48

There was a small typo in my initial post: The problem occurs when the From-field is formatted as "Some Name" <some.name@example.com>. When the quotes are not present it works as expected. There is no extra set of quotes surrounding the entire From-field.

Here's the part of the log where the actual body message is retrieved:

Code: Select all

Frame 30 (128 bytes on wire, 128 bytes captured)
====================================
Transmission Control Protocol, Src Port: 36723 (36723), Dst Port: imap (143), Seq: 632, Ack: 2379, Len: 62
Internet Message Access Protocol
    12 UID FETCH 29005 (BODY.PEEK[1]<0.20480> BODY.PEEK[1.MIME])\r\n
        Request Tag: 12
        Request: UID FETCH 29005 (BODY.PEEK[1]<0.20480> BODY.PEEK[1.MIME])

Frame 31 (103 bytes on wire, 103 bytes captured)
====================================
Transmission Control Protocol, Src Port: imap (143), Dst Port: 36723 (36723), Seq: 2379, Ack: 694, Len: 37
Internet Message Access Protocol
    * 9 FETCH (UID 29005 BODY[1]<0> {7}\r\n
        Response Tag: *
        Response: 9 FETCH (UID 29005 BODY[1]<0> {7}

Frame 32 (228 bytes on wire, 228 bytes captured)
====================================
Transmission Control Protocol, Src Port: imap (143), Dst Port: 36723 (36723), Seq: 2416, Ack: 694, Len: 162
Internet Message Access Protocol
    Some Message\r\n
        Response Tag: Some Message
     BODY[1.MIME] {110}\r\n
        Response:  BODY[1.MIME] {110}
    Content-Type: text/plain; charset=ISO-8859-1\r\n
        Response Tag: Content-Type:
        Response: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: 7bit\r\n
        Response Tag: Content-Transfer-Encoding:
        Response: 7bit
    Content-Disposition: inline\r\n
        Response Tag: Content-Disposition:
        Response: inline
    \r\n
    )\r\n
        Response Tag: )
    12 OK UID completed\r\n
        Response Tag: 12
        Response: OK UID completed

Frame 33 (128 bytes on wire, 128 bytes captured)
====================================
Transmission Control Protocol, Src Port: 36723 (36723), Dst Port: imap (143), Seq: 694, Ack: 2578, Len: 62
Internet Message Access Protocol
    13 UID FETCH 29005 (BODY.PEEK[2]<0.20480> BODY.PEEK[2.MIME])\r\n
        Request Tag: 13
        Request: UID FETCH 29005 (BODY.PEEK[2]<0.20480> BODY.PEEK[2.MIME])

Frame 34 (104 bytes on wire, 104 bytes captured)
====================================
Transmission Control Protocol, Src Port: imap (143), Dst Port: 36723 (36723), Seq: 2578, Ack: 756, Len: 38
Internet Message Access Protocol
    * 9 FETCH (UID 29005 BODY[2]<0> {32}\r\n
        Response Tag: *
        Response: 9 FETCH (UID 29005 BODY[2]<0> {32}

Frame 35 (252 bytes on wire, 252 bytes captured)
====================================
Transmission Control Protocol, Src Port: imap (143), Dst Port: 36723 (36723), Seq: 2616, Ack: 756, Len: 186
Internet Message Access Protocol
    <div dir="ltr">Some Message<br></div>\r\n
        Response Tag: <div
        Response: dir="ltr">Some Message<br></div>
     BODY[2.MIME] {109}\r\n
        Response:  BODY[2.MIME] {109}
    Content-Type: text/html; charset=ISO-8859-1\r\n
        Response Tag: Content-Type:
        Response: text/html; charset=ISO-8859-1
    Content-Transfer-Encoding: 7bit\r\n
        Response Tag: Content-Transfer-Encoding:
        Response: 7bit
    Content-Disposition: inline\r\n
        Response Tag: Content-Disposition:
        Response: inline
    \r\n
    )\r\n
        Response Tag: )
    13 OK UID completed\r\n
        Response Tag: 13
        Response: OK UID completed

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Re: IMAP Problems

Post by westdam » 2008-09-28 02:42

i've got the same trouble with nokia e51. it's a nokia imap client sickness.. it's well know but not yet resolved.

calvi
Normal user
Normal user
Posts: 65
Joined: 2004-03-17 23:34
Location: Melbourne, Australia

Re: IMAP Problems

Post by calvi » 2008-11-09 00:43

I have the same issue with a SE W950i.

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

Re: IMAP Problems

Post by martin » 2008-11-09 01:06

Okay. If your e-mail client has a bug (which I assume since you're saying you're having the same problem), please contact the company creating the client. :)

kwailo888
New user
New user
Posts: 8
Joined: 2007-07-10 08:44

Re: IMAP Problems

Post by kwailo888 » 2009-01-16 09:51

Hi guys. ok this is my first post so be gentle.

I've also been having this problem and hopefully i've narrowed down to what i believe is the answer. It seems to have nothing to do with the from field ( with or without quotes ) but more to do with the from field being the last reply in the structure request.

To explain a bit look at the request contains the following :

BODY.PEEK[HEADER.FIELDS (Received Date Subject From Priority X-Priority X-MSMail-Priority Importance Precedence)])

When the highlighted fields are not in the mail message then the last returned info is the from field and the device chokes. When one of the fields after the from field exists in the mail message then the from field is displayed. does that make sense :)

If this is the problem with the device then maybe a small modification to return something like X-Priority: 3 ( normal message) when these fileds are missing could solve this problem.

Your thoughts

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: IMAP Problems

Post by ^DooM^ » 2009-01-16 11:12

I'm using a Sony Ericsson C905 with IMAP Push without any issues that I can see accessing hMail V5 B318

What Version of hMail are you using and with what client?
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

kwailo888
New user
New user
Posts: 8
Joined: 2007-07-10 08:44

Re: IMAP Problems

Post by kwailo888 » 2009-01-16 12:40

I'm using a Nokia N73 on hMailserver 4.4.2 B279. but I have tested this and noticed this issue on most of the Nokia N series ane E series phone I have not tested with other models.

I am patching my test server with a possible workaround to see if this is actually the case and will report back with what I learn.

kwailo888
New user
New user
Posts: 8
Joined: 2007-07-10 08:44

Re: IMAP Problems

Post by kwailo888 » 2009-01-16 13:06

Ok as far as my Nokia N73 goes I can confirm that this is the problem after patching hMailserver to return X-Priority: 3 when no priority was in the mail message but requested by the Nokia device all From field information correctly shows. Without this patch the from field is missing.

As far as my personal usage is concerned this has solved my problem :) for those who are interested i put a switch in IMAPFetch::_GetByteBufferByBodyPart to check if the header field is requested and to put the defult X-Priority: 3 in the response when the value returned in empty. hope this helps someone

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: IMAP Problems

Post by ^DooM^ » 2009-01-16 13:12

Nice work but that tells me its a bug in the nokia client wouldn't you say?
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

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

Re: IMAP Problems

Post by martin » 2009-01-16 13:31

From the IMAP RFC:
The subset returned by HEADER.FIELDS contains only those header fields with a field-name that matches one of the names in the list; The field-matching is case-insensitive but otherwise exact.
As I read this, the response should only include the requested fields which actually exist in the MIME header field list. I tried to connect to gmail using IMAP and it behaves the same way as hMailServer here. If I sent the same IMAP command as posted in the thread here, I don't get an X-Priority header back unless the message contains one.

Automatically inserting a X-Priority header even though one does not exist would hence create a bug in hMailServer (since it goes against the RFC), which may cause problems to other clients. Could very well be that other clients reports errors / hangs if hMailServer feeds them data they haven't requested.

kwailo888
New user
New user
Posts: 8
Joined: 2007-07-10 08:44

Re: IMAP Problems

Post by kwailo888 » 2009-01-16 13:43

Hi Martin,

I fully agree with you this is not an error with hMailserver rather a quirk of the Nokia device ( actually probabbly a bug ) . what I have actually done in code is to return back to the client a priority of normal message when a priority header is requested but no priority information exists in the mail message ( my assumption here is if no priority is in the message then the message is of normal priority ).

I'm not suggesting that you change hMailserver but just alerting you to my findings. What I have done with my local installed version works for me and hopefully by letting you know my results may help you improve you fantastic work.

Regards

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

Re: IMAP Problems

Post by martin » 2009-01-16 13:51

You're right, I could create a dummy field if it is requested but doesn't exist. But that still means introducing a bug into hMailServer. :-\

Jaybee
New user
New user
Posts: 7
Joined: 2009-03-30 10:25

Re: IMAP Problems

Post by Jaybee » 2009-03-30 11:57

Hi,

the same effect occurs on Sony Ericsson Symbian phones, in my case a P1i. Most incoming emails are listed without the from information. I used version 5.0 of hmailserver.

I understand that this is not a bug of hmailserver. But wouldn't it be possible to include some kind of an option which performs as a workaround?

Has the modifications mentioned by kwailo888 to be done in the source code? This means that the project had to be recompiled, right?

I hope a solution can be found, because the use of mobile phones is an important aspect I guess.

Thanks,
Jaybee

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: IMAP Problems

Post by ^DooM^ » 2009-03-30 12:30

hMail V5 works fine with my SE C905 Mobile phone with IMAP and push enabled.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

Jaybee
New user
New user
Posts: 7
Joined: 2009-03-30 10:25

Re: IMAP Problems

Post by Jaybee » 2009-03-30 15:10

That's why I wrote Symbian phones.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: IMAP Problems

Post by ^DooM^ » 2009-03-30 15:53

understood but if sony can get it right for my c905 then surely they should have it right on a symbian phone :roll:
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

Jaybee
New user
New user
Posts: 7
Joined: 2009-03-30 10:25

Re: IMAP Problems

Post by Jaybee » 2009-03-30 16:21

From what I have read it seems that not only SE Symbian phones are affected but all Symbian phones (e.g. Nokia E series). So probably the Symbian foundation developers are responsible for this bug.

Unfortunately SE has recently skipped their whole Symbian line and moved to Windows mobile, thus from SE we can't expect updates anymore.

BTW I just tested it with an iPhone and it works perfectly. I'm quite new to hmailserver but can already say, it's awesome! :D

Jaybee
New user
New user
Posts: 7
Joined: 2009-03-30 10:25

Re: IMAP Problems

Post by Jaybee » 2009-04-17 16:27

Just for reference: When connecting to Exchange via IMAP this problem doesn't occur at all.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: IMAP Problems

Post by ^DooM^ » 2009-04-17 19:07

Well there's something you don't see every day :D
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

Jaybee
New user
New user
Posts: 7
Joined: 2009-03-30 10:25

Re: IMAP Problems

Post by Jaybee » 2009-04-17 19:42

I'm not sure what you would like to communicate. However, we probably have to face the fact that Microsoft implemented imap faulty causing my phone to work perfectly, while hmailserver implemented imap absolut correctly causing troubles on my phone. That's really something you don't see every. :shock:

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: IMAP Problems

Post by ^DooM^ » 2009-04-17 19:56

The fact that IMAP on exchange actually works is not something you see regularly ;)
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

Post Reply