Bug 60846

Summary: Filter action "Rewrite Header" doesn't really rewrite
Product: [Unmaintained] kmail Reporter: Malte S. Stretz <mss>
Component: filteringAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: 1.5.2   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: screenshot of the message list
the next mail in the list

Description Malte S. Stretz 2003-07-06 14:15:21 UTC
Version:           1.5.2 (using KDE 3.1.2)
Installed from:    SuSE
Compiler:          gcc version 2.95.3 20010315 (SuSE)
OS:          Linux (i686) release 2.4.18

I extended some of my mailinglist filter to remove those [tags]. Eg. I've got now:
  if "List-Id" contains "<spamassassin-talk.lists.sourceforge.net>" then
    move to folder "SpamAssassin-Talk"
    rewrite header "Subject": replace "\[SAtalk\]\*" with ""
  end

When I now receive a mail from that list, the header first *look*s correct. But as soon as I select the mail, the old Subject reappears. I had a look at the source (ie. the file in the Maildir) of one of those messages before I selected it and it seems like the Subject was never really rewritten.
Comment 1 Malte S. Stretz 2003-07-06 14:19:12 UTC
Created attachment 1954 [details]
screenshot of the message list

As you can see, has the selected message the [SAtalk] tag again, the next not
(yet).
Comment 2 Malte S. Stretz 2003-07-06 14:20:33 UTC
Created attachment 1955 [details]
the next mail in the list

in the list it looks like this mail was modified but the source tells us it
wasn't
Comment 3 Malte S. Stretz 2003-07-06 15:21:06 UTC
Seems like it depends on the order of the actions. I've got another filter which 
works: 
  if "List-Id" contains "<spamassassin-devel.lists.sourceforge.net>" then 
    rewrite header "Subject": replace "\[SAdev\]\s*" with "" 
    move to folder "SpamAssassin-Devel" 
  end 
 
Comment 4 Ingo Klöcker 2003-07-06 19:14:23 UTC

*** This bug has been marked as a duplicate of 53201 ***
Comment 5 Ingo Klöcker 2003-07-06 19:14:56 UTC
Subject: Re:  Filter action "Rewrite Header" doesn't really rewrite

Yes, it depends on the order of the actions. The Move action always has 
to be the last action.