Summary: | Broken headers in message list with (online) IMAP | ||
---|---|---|---|
Product: | [Applications] kmail | Reporter: | Andre Woebbeking <woebbeking> |
Component: | IMAP | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.6.82 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | kmfolderimap.diff |
Description
Andre Woebbeking
2004-07-25 19:22:32 UTC
What server are you using? Cyrus IMAP4 v2.0.16 und Web.de IMAP. This is a known problem of web.de - their imap implementation is simply broken. It happens sometimes with older cyrus versions, an update will help. To be sure: please capture the traffic between your box and the imap server with ethereal when you select a folder that has new mails in it that show the described behaviour. Normally the server itself strips the whitespace. > update will help. To be sure: please capture the traffic between your
> box and the imap server with ethereal when you select a folder that
> has new mails in it that show the described behaviour.
the traffic is SSL encrypted. Is there a kdDebug output I can activate
instead?
> Cyrus IMAP4 v2.0.16 und Web.de IMAP.
BTW, with KDE 3.2.3 n spaces are always reduced to one.
*** Bug 86580 has been marked as a duplicate of this bug. *** On Monday 26 July 2004 22:45, Carsten Burghardt wrote:
> It happens sometimes with older cyrus versions, an update will help.
I updated Cyrus IMAP to 2.2.3 and can still reproduce it.
This bug is also present when using courier-imap-3.0.5. OK, can anyone please apply the attached patch and start kmail in a console? When the headers of new messages are downloaded the content is printed with "msg data:". If this is the same as kmail displays then it's a problem of the server. Created an attachment (id=7080) kmfolderimap.diff Well, I get this: kmail: MESSAGE data:X-UID: 17404 X-Length: 562 X-Date: 11-Aug-2004 22:20:28 +0200 X-Flags: 32 From: Test,Test <test@test.com> Sender: Test,Test <test@test.com> Reply-To: Test,Test <test@test.com> which displays incorrectly as "Test, Test". This debug statement only shows up on new messages (is that correct?), but the behaviour is on read messages as well. Perhaps this also confirms the data of the server: emailAddrAsAnchor('"Test,Test" <test@test.com>') returns: I did find another way to reproduce the behaviour: - click on mail (space gets added) - move focus to another program (space gets removed) hopefully this helps. > Well, I get this: > > kmail: MESSAGE data:X-UID: 17404 > X-Length: 562 > X-Date: 11-Aug-2004 22:20:28 +0200 > X-Flags: 32 > From: Test,Test <test test com> > Sender: Test,Test <test test com> > Reply-To: Test,Test <test test com> As you see the envelope that is reported by the server says "Test,Test" (without space) and this information is saved as local cache. > which displays incorrectly as "Test, Test". This debug statement only shows > up on new messages (is that correct?), but the behaviour is on read > messages as well. Of course: when you retrieve the complete email the server sends this "as is" and the sender is "Test, Test". This information is displayed when you click on the email. You can view the source of the email - it will be "Test, Test". So the situation is: the server reports different things when you retrieve only the envelope and the complete email. As the envelope is stored in the index (and not updated) you only see the space in the headerlist when you click on it. I don't know any way to work around this as the information provided by the server is simply wrong. Carsten AFAIK, the server is reporting it correctly. In my earlier message, I wrote "Test,Test" without a space. In checked the source of the message, which also states "Test,Test" <test@test.com>. So, I am convinced the server is not doing anything wrong. Of course, now we want to know what happens if I write a mail with "Test, Test" with a space in between. Now the server reports: MESSAGE data:X-UID: 17407 X-Length: 564 X-Date: 11-Aug-2004 22:49:22 +0200 X-Flags: 32 From: Test, Test <test@test.com> Sender: Test, Test <test@test.com> Reply-To: Test, Test <test@test.com> and this: kmail: KMMessage::emailAddrAsAnchor('"Test, Test" <test@test.com>') returns: And the source says: From: "Test, Test" <test@test.com> However, no bug occurs in kmail in this case, i.e. if a space is in the original message. Stated briefly: Bug: "Test,Test" in original message No bug: "Test, Test" in original message On Wednesday 11 August 2004 20:35, Carsten Burghardt wrote:
> OK, can anyone please apply the attached patch and start
> kmail in a console? When the headers of new messages are downloaded
> the content is printed with "msg data:". If this is the same as kmail
> displays then it's a problem of the server.
Is the debug output the original data sent by the server or is it
already parsed by the IMAP ioslave?
BTW, I can't reproduce this with Thunderbird 0.7.3. Neither with Cyrus nor with web.de. CVS commit by burghard: Do not remove white spaces from the subject. This is the fix for the kioslave, the sender/receiver have to be fixed in kmail. CCMAIL: 85952@bugs.kde.org M +1 -1 imapparser.cc 1.87 --- kdepim/kioslaves/imap4/imapparser.cc #1.86:1.87 @@ -679,5 +679,5 @@ mailHeader * imapParser::parseEnvelope ( //subject - envelope->setSubjectEncoded(parseLiteralC(inWords)); + envelope->setSubject(parseLiteralC(inWords)); QPtrList<mailAddress> list; CVS commit by burghard: Quote email adresses and thus display the sender/receiver correctly in kmail. Thanks Marc ;-) CCMAIL: 85952-done@bugs.kde.org M +3 -2 Makefile.am 1.25 M +2 -0 mailaddress.cc 1.14 --- kdepim/kioslaves/imap4/mailaddress.cc #1.13:1.14 @@ -26,4 +26,5 @@ #include "rfcdecoder.h" #include "mimehdrline.h" +#include <kmime_util.h> mailAddress::mailAddress () @@ -203,4 +204,5 @@ mailAddress::getStr () if (!rawFullName.isEmpty ()) { + KMime::addQuotes( rawFullName, false ); retVal = rawFullName + " "; } --- kdepim/kioslaves/imap4/Makefile.am #1.24:1.25 @@ -1,3 +1,4 @@ -INCLUDES= -I$(srcdir)/.. $(SSL_INCLUDES) $(all_includes) +INCLUDES= -I$(top_srcdir)/libkdenetwork \ + -I$(srcdir)/.. $(SSL_INCLUDES) $(all_includes) ####### Files @@ -8,5 +9,5 @@ mimeheader.cc rfcdecoder.cc imap4.cc imapinfo.cc imapparser.cc mailheader.cc \ mimehdrline.cc mimeio.cc -kio_imap4_la_LIBADD = -lkdesasl $(LIB_KIO) +kio_imap4_la_LIBADD = -lkdesasl $(LIB_KIO) ../../libkdenetwork/libkdenetwork.la kio_imap4_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -module $(KDE_PLUGIN) I still have this problem with KDE from CVS HEAD and web.de. Mozilla Thunderbird shows the same things without any problems. > ------- Additional Comments From woebbeking web de 2005-01-23 09:26
> ------- I still have this problem with KDE from CVS HEAD and web.de.
Can you provide a testmail or describe what problem you see?
An example is your reply I got from KDE's bug tracker. It's the original issue. In the sender column of the message list sometimes I see Carsten Burghardt and sometimes CarstenBurghardt. This toggles if I select/deselect the mail. On Sunday 23 January 2005 16:30, Andre Woebbeking wrote: > An example is your reply I got from KDE's bug tracker. It's the > original issue. In the sender column of the message list sometimes I see > Carsten Burghardt and sometimes CarstenBurghardt. This toggles if I > select/deselect the mail. It's unfortunately still the problem of web.de. I copied the mail to my web.de account and then requested the envelope information which we use to display the headers: * 1 FETCH (UID 341000269 ENVELOPE ("Sun, 23 Jan 2005 13:49:19 +0100" "Re: [Bug 85952] Broken headers in message list with (online) IMAP" (("CarstenBurghardt" NIL "burghardt" "kde.org")) (("CarstenBurghardt" NIL "burghardt" "kde.org")) (("CarstenBurghardt" NIL "burghardt" "kde.org")) ((NIL NIL "85952" "bugs.kde.org")) NIL NIL "<20050123082635.8577.qmail@ktown.kde.org>" "<200501231349.20013.burghardt@kde.org>")) . OK UID FETCH Completed As you can see the spaces are missing in the response from the server. I already sent a report about this problem to web.de months ago but they never answered. On Sunday 23 January 2005 23:52, Carsten Burghardt wrote:
>
> As you can see the spaces are missing in the response from the
> server. I already sent a report about this problem to web.de months
> ago but they never answered.
But why does it work with Thunderbird?
> But why does it work with Thunderbird?
Thunderbird obviously decided to use several workaounds for broken servers
or mails and this seems to be one of them. The only thing I can imagine is
that they use the information from the complete email to update the
headerlist.
Does Thunderbird show the headers correctly when you have not clicked on
the email yet? Can you check with ethereal what it actually requests from
the server?
Kmail version 1.7.2, KDE 3.3.2., Gentoo packages. I have isolated another testcase which is not handled correctly. If I receive a mail with a From: field which looks like "Test Test (Test)" <test@test.com> then that is alternately shown as "Test Test (Test)" <test@test.com> "Test Test" <test@test.com> in a similar way the space used to be shown and not shown, as described in my comments #10 and #12. The problem with addresses of the form "Test Test (Test)" <test@test.com> does not occur with IMAP servers that send correct envelope information. Setting bug to fixed again. |