Bug 57908 - Wish: Notification on new mail only when not transferred to trash
Summary: Wish: Notification on new mail only when not transferred to trash
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mandrake RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-30 18:45 UTC by Mitsu Hadeishi
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to May 2003 KMAIL HEAD to allow "do not notify on new messages" flag for a folder (16.93 KB, patch)
2004-03-01 18:20 UTC, Mitsu Hadeishi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mitsu Hadeishi 2003-04-30 18:45:46 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Mandrake RPMs
Compiler:          gcc 3.2.2 
OS:          Linux

I see someone else reported this as a "bug" but I would like to re-enter it as a feature request.

In these days of excessive spam it is increasingly unuseful to get a notification for all incoming email.  In particular, I have a lot of filters (which I migrated from Eudora with a Perl script), many of which move mail to specific folders but a lot of which move mail to the trash.  Eudora's default behavior is not to notify if there is a filter moving mail to the trash.

It is of course "correct" to notify the user when they get mail they have moved to the trash, but it would be a very useful feature to be able to notify only when mail is not moved to the trash by a filter.

This is NOT the same as a per-folder notification rule, as another wishlist item requested.  Per-folder notification is cumbersome, because that would mean I would have to write a separate filter rule for every folder (and I have a lot of them).  What would be desirable is a "notify EXCEPT when mail arrives in a given folder (in my case, the trash)".

Perhaps another way to implement this would be to have a "do not notify" option attached to a given folder, and if mail arrives in that folder the notification would be turned off.  By default, this flag could be attached to the trash folder.

I have sifted through the KMail 1.5 source code and it appears that implementing this would be complicated by the fact that POP email appears to be filtered after the new mail notification signal is sent.  This new notification scheme would require that new mail notification be delayed until after the filter processing has happened.

I am going to implement this by kludging in my own code but I think this would be better done more cleanly, so I'm adding this as a feature request.  If someone would like to contact me about how I am doing my kludge, please do so.  It would probably help you in your efforts to implement this if you so desire.
Comment 1 Mitsu Hadeishi 2003-04-30 19:02:20 UTC
I stand corrected.  The finish check happens after the filters are called; so this should 
be a relatively easy thing to do.  Basically, when a filter move action is called on a folder 
marked "do not notify", a different return code can be returned which notifies the caller 
that a message was moved to a do not notify folder, which can be handled differently. 
 
Comment 2 Mitsu Hadeishi 2003-05-02 07:50:09 UTC
Well, I downloaded the source code to kdenetwork 3.1 and added this feature to it.  It's 
fairly clean but right now just limited to turning off mail notification for the trash folder.  It 
is trivial to modify it (just redefine one method) to support other schemes for identifying 
folders where you do not want notification. 
 
Please contact me if you'd like my changes. 
Comment 3 Mitsu Hadeishi 2003-05-14 21:13:51 UTC
I implemented this is KMail 1.5 (from KDE 3.1) and ported it to KMail HEAD and
submitted it to the KMail developers, so hopefully it will get integrated into
KMail.
Comment 4 mischa 2003-09-11 18:32:11 UTC
 
I have a different take on this feature request. As near as I can tell, most 
KMail users will have filters set up for their accounts. Regardless of how 
extensive their filters are, users would wish to disable notification for a 
certain set of incoming mail- say, mail that gets into their spam folder, or 
perhaps a high-traffic mailing list.  
 
Wouldn't a filter action (or checkbox, probably) meet this need more 
accurately than folder-by-folder preferences? I forsee a checkbox in the 
filter rule dialog near the "If this filter matches, stop processing here" 
checkbox. It could be labeled "If this filter matches, do not notify me." In 
my mind, most people are familiar with filter management, and it seems that 
keeping this option near where it would likely be sought makes a lot of sense. 
 
I'm not sure why nobody has suggested this idea yet- it seems like a pretty 
neat solution to this problem. OTOH, I may have missed another bug mentioning 
this idea. Of course, there may be any number of technical reasons to not do 
this, but I confess my ignorance. 
 
I also know that there is a filter action called Execute Command, but I don't 
think that covers the Kmail notification function. 
 
Also, it seems to me that several bugs all group around this same notion of 
selective notification. In particular, I've found that bugs 54268, 63710, and 
60991 look similar- Is there a protocol for duplicate feature requests? 
 
Thanks for reading, 
 
Mischa. 
Comment 5 Jeremy Kerr 2004-02-29 23:50:56 UTC
This would be a great feature - I see it implemented as a filter 'target' (along the lines of 'Move to Folder', 'Mark As...'), which allows you to filter which messages do or do not cause notification.

At present, I'm subscribed to a few fairly high-volume mailing lists (ie linux-kernel) and would prefer not to be notified when new messages arrive from this list, as there is almost always at least one new message each time I check mail.

Keep up the great work,


Jeremy
Comment 6 Cornelius Schumacher 2004-03-01 00:39:52 UTC
Comment #3 speaks about a patch. Would it be possible to attach the patch to this bug report so that it doesn't get lost?
Comment 7 Mitsu Hadeishi 2004-03-01 18:20:06 UTC
Created attachment 4961 [details]
Patch to May 2003 KMAIL HEAD to allow "do not notify on new messages" flag for a folder

Here's the patch I submitted last May --- I never had the time to fix the
issues that Ingo pointed out in the patch, though I keep planning to get back
to it.	I also think this is a great feature, in fact, for me, KMail would be
pretty much useless without it.  I have my own personal patched version running
on my machine here, but I'm probably the only one who has this feature!
Comment 8 Tom Albers 2004-09-19 23:20:42 UTC
This is fixed in KDE 3.3 / KMail 1.7.