GNOME Bugzilla – Bug 322016
Mail notification sends NewMail on any kind of folder change
Last modified: 2013-09-10 14:04:09 UTC
Please describe the problem: The NewMail notification plugin sends the NewMail dbus signal even when there isn't new mail. For example simply moving an old (read message) from one folder to another will make the plugin emit the signal Steps to reproduce: 1. Move a message from one folder to another Actual results: NewMail dbus signal emitted, even though no new mail has actually arrived Expected results: NewMail signal should only emit when new mail truely arrives Does this happen every time? Yes Other information: The problem seems to be that the plugin relies on the 'folder.changed' event - but as the plugin manual states: 'there is no detail on how the folder changed'. I think using just a folder.changed event is flawed. There really needs to be a new event for the plugin system, namely that newmail has truely arrived (i.e. an event that arises from the standard 'mail checking' procedures). That seems to me to be the only reliable method of emitting a signal only when new mail has actually been received by the evolution mailer.
same with playing a sound when new mail arrives within evolution
*** Bug 322253 has been marked as a duplicate of this bug. ***
raising priority, targetting as this is a major annoyance
Looking at the code, I see that the folder.changed event is passed an EMEventTargetFolder structure, which is contains a flag EM_EVENT_FOLDER_NEWMAIL (although curiously this flag is inverted in em_event_target_new_folder() - not sure why). Therefore the plugin code in new-mail-notify.c could potentially test this flag to decide wether to send the dbus message - this would save having to code a brand new plugin event type. Is this kind of code discussion welcome here - or should it be on the evolution-hackers list?
*** This bug has been marked as a duplicate of 311512 ***