Bug 327779 - redirect overwrites To:
Summary: redirect overwrites To:
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: 4.10.5
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-18 18:33 UTC by Timo Weingärtner
Modified: 2014-03-07 07:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.4


Attachments
Attempt to fix (untested) (312 bytes, patch)
2014-03-06 11:34 UTC, Sébastien Le Ray
Details
Unified diff patch (830 bytes, patch)
2014-03-06 11:35 UTC, Sébastien Le Ray
Details
Final version (tested) (2.92 KB, patch)
2014-03-07 07:18 UTC, Sébastien Le Ray
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timo Weingärtner 2013-11-18 18:33:34 UTC
when redirecting a mail, Redirect-To: is copied to To:
Comment 1 Laurent Montel 2013-11-18 20:18:59 UTC
ok ... what is the bug ?
What is the problem ?
What do you expect ?
etc.
Comment 2 Timo Weingärtner 2013-11-18 22:22:09 UTC
> ok ... what is the bug ?
> What is the problem ?
> What do you expect ?

I expect my MUA to follow the relevant RFC as it did before.

https://tools.ietf.org/html/rfc5322#section-3.6.6 says:
No other fields in the message are changed when resent fields are added.
Comment 3 Laurent Montel 2013-12-10 08:03:32 UTC
Ok will investigate
Comment 4 Sébastien Le Ray 2014-03-06 11:34:09 UTC
Created attachment 85444 [details]
Attempt to fix (untested)

Hi

I've just been hit by this bug too…

Looking at the source it seems that MessageComposer::MessageFactory::createRedirect intentionaly add the to header as a copy of the Resent-To (l.536) without any reason (because X-KMail-Recipients will be used at transport level so it'll get ignored).

I've no time to set up a dev environment on my box right now but I guess attached patch should fix it, it handle the "To" header the same way other headers are handled.
Comment 5 Sébastien Le Ray 2014-03-06 11:35:48 UTC
Created attachment 85445 [details]
Unified diff patch

Sorry, missed the -u on previous one
Comment 6 Laurent Montel 2014-03-07 06:33:48 UTC
Git commit 897c7f66fcf94962cfb8b6fdc03221f97bbebc57 by Montel Laurent.
Committed on 07/03/2014 at 06:33.
Pushed by mlaurent into branch 'KDE/4.12'.

Fix Bug 327779 - redirect overwrites To:

FIXED-IN: 4.12.4

Patch from Sébastien Le Ray

M  +4    -2    messagecomposer/helper/messagefactory.cpp

http://commits.kde.org/kdepim/897c7f66fcf94962cfb8b6fdc03221f97bbebc57
Comment 7 Sébastien Le Ray 2014-03-07 07:18:32 UTC
Created attachment 85461 [details]
Final version (tested)

I took time to set up an environment and looked deeper at the sources & spec… It seems that the way it handles redirects does not respect the spec. The Cc and Bcc are added to Resent-(B)Cc headers which is not what the spec says.
Here is a more complete and correct patch. First it avoids the double To: header introduced in the previous one, ensure to clean up any Resent-* headers and modifies akonadisender to handle Resent-(To|Cc|Bcc) properly (even if Kmail doesn't use the last two headers). The X-Kmail-Recipients is then useless in createRedirect.