Your message with subj: [PATCH] Fix for the reply-to-all bug. --Boundary_(ID_RpXc1ny5V3cEWehlFEYmnw) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! I finally tracked down this bug. After I was able to reproduce it, it was quite easy. For those of interested: The bug was that the whole To: header was omitted when two conditions were met by the replied-to message' To: header: 1. It was folded after each address-delimiting "," 2. It contained the default identity of the user (Marc@Mutz.com in my case). The first condition let decodeRFC204String() to delete separating whitespace (in violation to RFC822, BTW, since "CRLF LWSP-char" must be considered equivalent to LWSP-char), leaving only the separating ",". This part of the bug is fixed by the first and only hunk for kmmsgbase.cpp. The second condition made KMMessage::createReply() (via toStr.find(<...>-Part of newmsg->from()) ) run back the length of the toStr in search for ", " (note the space, which is BTW also in violation of RFC822, which states that m#n abc is equivalent to abc m-1*n-1("," abc)), which it didn't find, leading to the interpretation of the whole to() string as a single address... All in all the createReply() function is still very buggy, since it doesn't cope with (valid!) embedded (escaped) DQUOTE's in quoted-string's, nor does it seem to handle ',''s in quoted-string's. But fixing this would require a real parser, which I'm not going to write for _this_ code (doesn't mimelib provide an address-list parser?). I have to write one for the new mimelib-replacement, though. Also, it always assumes the default identity for it's "strip my own mail address" functionality. So the attached patch only replaces the search strings ", " with ','. Marc - -- Marc Mutz http://marc.mutz.com/ http://www.mathematik.uni-bielefeld.de/~mmutz/ http://EncryptionHOWTO.sourceforge.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7PfnO3oWD+L2/6DgRAgfzAJ467Z1+O1rkmpdBcqeQHlqjzwa8MgCbBOqL lOJ5B4OBUX8WRAvmAvdDxJA= =yL5J -----END PGP SIGNATURE----- --Boundary_(ID_RpXc1ny5V3cEWehlFEYmnw) Content-type: text/x-diff; name=kmail-fix-reply-to-all.diff; charset=iso-8859-1 Content-disposition: attachment; filename=kmail-fix-reply-to-all.diff Content-transfer-encoding: 7BIT Index: kmmsgbase.cpp =================================================================== RCS file: /home/kde/kdenetwork/kmail/kmmsgbase.cpp,v retrieving revision 1.79 diff -u -3 -p -r1.79 kmmsgbase.cpp --- kmmsgbase.cpp 2001/06/21 15:34:52 1.79 +++ kmmsgbase.cpp 2001/06/30 14:08:03 @@ -287,7 +287,7 @@ QString KMMsgBase::decodeRFC2047String(c result += *pos; } } - return result.replace(QRegExp("\n[ \t]"),""); + return result.replace(QRegExp("\n[ \t]")," "); } Index: kmmessage.cpp =================================================================== RCS file: /home/kde/kdenetwork/kmail/kmmessage.cpp,v retrieving revision 1.210 diff -u -3 -p -r1.210 kmmessage.cpp --- kmmessage.cpp 2001/06/27 09:46:27 1.210 +++ kmmessage.cpp 2001/06/30 14:08:05 @@ -706,14 +706,14 @@ KMMessage* KMMessage::createReply(bool r { int pos1, pos2, quot; quot = toStr.findRev("\"", i); - pos1 = toStr.findRev(", ", i); + pos1 = toStr.findRev(',', i); if (pos1 < quot) { quot = toStr.findRev("\"", quot - 1); - pos1 = toStr.findRev(", ", quot); + pos1 = toStr.findRev(',', quot); } if( pos1 == -1 ) pos1 = 0; - pos2 = toStr.find(", ", i); + pos2 = toStr.find(',', i); toStr = toStr.left(pos1) + toStr.right(toStr.length() - pos2); } else @@ -724,14 +724,14 @@ KMMessage* KMMessage::createReply(bool r { int pos1, pos2, quot; quot = ccStr.findRev("\"", i); - pos1 = ccStr.findRev(", ", i); + pos1 = ccStr.findRev(',', i); if (pos1 < quot) { quot = ccStr.findRev("\"", quot - 1); - pos1 = ccStr.findRev(", ", quot); + pos1 = ccStr.findRev(',', quot); } if( pos1 == -1 ) pos1 = 0; - pos2 = ccStr.find(", ", i); + pos2 = ccStr.find(',', i); ccStr = ccStr.left(pos1) + ccStr.right(ccStr.length() - pos2 - 1); //Daniel } else --Boundary_(ID_RpXc1ny5V3cEWehlFEYmnw)-- has caused the attached bug report to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I'm talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Stephan Kulow (administrator, KDE bugs database) Received: (at submit) by bugs.kde.org; 11 Jun 2001 13:03:42 +0000 Received: (qmail 17852 invoked by uid 33); 11 Jun 2001 13:03:42 -0000 Date: 11 Jun 2001 13:03:42 -0000 Message-ID: <20010611130342.17851.qmail@master.kde.org> To: submit@bugs.kde.org Subject: reply-to-all selects only reply-to From: roger.larsson@norran.net Package: kmail Version: KDE 2.2.0 Alpha2 Severity: normal Installed from: SuSE RPMs Compiler: Not Specified OS: Not Specified OS/Compiler notes: Not Specified Using reply-to-all as a reply to a mail containing the following header (edited) results in replying to "From Name" only - no CCs. Might it be related to the national characters or that I am the first in the to list? From: "From Name" Subject: Subject To: Roger Larsson ,  To 2 ,  To 3 ,  =?iso-8859-1?Q?=C5keK=E5to3?= X-Mailer: QuickMail Pro 2.1 (Mac) X-Priority: 3 MIME-Version: 1.0 Reply-To: "From Name" (Submitted via bugs.kde.org) _______________________________________________ Kmail Developers mailing list Kmail@master.kde.org http://master.kde.org/mailman/listinfo/kmail