Bug 54936 - Crash when a filter moves a mail to unexisting folder
Summary: Crash when a filter moves a mail to unexisting folder
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: filtering (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-20 22:09 UTC by Iván Sánchez Ortega
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Iván Sánchez Ortega 2003-02-20 22:09:38 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Debian testing/unstable Packages
OS:          Linux

I did the following:

- Subscribe to a mailing list
- Create a folder and a filter (subject) to keep the mailing list mails apart
- Read/write to the mailing list for a period of time
- Unsubscribe to the mailing list
- Delete the folder of that list, forgetting to remove the filter
- Receive a (somewhat unexpected) mail that was affected by that filter
- See how kmail crashed shortly after that.

As I could check later, the folder was gone, but the filter was still there. IMHO, kmail tries to move the mail to the (unexisting) folder, and something goes wrong from there.

The filter was a "if "To:" contains "whatever", then move the message to folder "whatever" ".

I suppose that checking all the filters when deleting folders would be a quick and good solution.

Keep the good work  :)
Comment 1 Till Adam 2003-05-26 17:35:51 UTC
Hm, with current cvs, kmail doesn't crash, but it does move the mail to the wrong folder, drafts, to 
be precise, which is guess is the first non-system local folder here. I'm changing this to normal 
priority, since it isn't a crash anymore, but I'm hesitant to close it, as moving to a "random" folder 
does not sound like correct behavior to me either. 
Comment 2 Iván Sánchez Ortega 2004-03-04 20:42:41 UTC
With recent CVS (20040220), the behaviour is the same. Maybe, when deleting a folder, should a pop-up appear saying "Heya, buddy, you deleted a folder that has an associated filter, so check your filters!".
Comment 3 Andreas Gungl 2004-03-30 23:46:58 UTC
To give some more details:
Deleting a folder in KMail while a filter action points to it invalidates the folder in the filter action. The problem is, if you open the filter dialog in that moment, you see the drafts folder preselected as target for the filter action.
If you cancel the dialog, nothing bad happens. After a restart, KMail has that filter action reset to using transfering into no folder. Another KMail restart or OK in the filter dialog even corrcetly removes the filter action.
However if you leave the filter dialog with OK while the drafts folder is set (which is wrong), the drafts folder is really associated with the filter action. Afterwards your messages go into the drafts folder and you wonder why.

That means, deleting a folder and applying filter rules which have this folder as target doesn't crash (as mentioned in the comments before) and it doesn't move your message anywhere as long as you don't acknowledge the filter dialog before KMail is restarted.
Comment 4 Andreas Gungl 2004-04-04 16:07:05 UTC
Fixed in KMail 1.7 / KDE PIM 3.3 / CVS HEAD. Kmail doesn't crash anymore. It will mark your concerned filter actions, but they won't be applied as long as you won't have adjusted them.