Version: 1.9.7 (using KDE KDE 3.5.8) Installed from: Debian testing/unstable Packages I have setting for MDN to be asked wether I wanna send or not. This works, when I read email. But when I delete, without reading it, kmail don't askes, but send MDN. This is espacially unhelpful when deleting spam eMail with MDN.
I just looked through the source. I think the problem is, that KMFilterAction::SendMDN calls msg->createMDN with KMime::MDN::AutomaticAction. Thats ok, but if this is called every user interaction is skipped. I think in that case kmail should either ask, or just don't send any MDN, as the user discarded (filtered) the message anyway.
As I understand KMMessage::createMDN right, it's even worse: if it is said to ignore (what should be mode = 0?) and it is AutomaticAction, it is send too, instead of ignored....
Created attachment 23482 [details] diff to solve the problem as I understand it This should do it. Don't have the resources to try it out at the moment.
Frank, thanks for the patch, I'll ask the author of the MDN code to review it.
Created attachment 23610 [details] Proposed, more general fix
> As I understand KMMessage::createMDN right, it's even worse: if it is said to > ignore (what should be mode = 0?) and it is AutomaticAction, it is send too, > instead of ignored.... That is not correct. 'Ignored' is handled near the beginning, of course: > // default: > int mode = mdnConfig.readEntry( "default-policy", 0 ); > if ( !mode || mode < 0 || mode > 3 ) { > // early out for ignore: > setMDNSentState( KMMsgMDNIgnore ); > return 0; > } As for your patch, please send minimal patches. Use the -bB options to diff, e.g. That said, I see no reason, indeed, to not ask the user on automatic actions if he indicated he wants to be asked. Your solution to never send an MDN for mode == Ask && automatic action is wrong, though. It might very well be that no-one calls createMDN() with a == AutomaticAction and allowGUI == true. But this case nevertheless needs to be handled. I've attached a new patch. Please check whether it fixes your problem.
As I said, I don't have the resources to compile a kmail right now, but the diff itself looks good.
SVN commit 777776 by mutz: Fix MDNs begin sent for automatic actions, when when the user wanted to be asked. BUG: 153904 M +4 -3 kmmessage.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=777776