After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 322016 - Mail notification sends NewMail on any kind of folder change
Mail notification sends NewMail on any kind of folder change
Status: RESOLVED DUPLICATE of bug 311512
Product: evolution
Classification: Applications
Component: Mailer
2.4.x (obsolete)
Other All
: Normal major
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 322253 (view as bug list)
Depends on:
Blocks: 327508 327510
 
 
Reported: 2005-11-21 09:54 UTC by Karl Relton
Modified: 2013-09-10 14:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Karl Relton 2005-11-21 09:54:33 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.
Comment 1 André Klapper 2005-11-21 12:48:47 UTC
same with playing a sound when new mail arrives within evolution
Comment 2 André Klapper 2005-11-23 22:22:00 UTC
*** Bug 322253 has been marked as a duplicate of this bug. ***
Comment 3 André Klapper 2005-11-23 22:22:35 UTC
raising priority, targetting as this is a major annoyance
Comment 4 Karl Relton 2005-11-24 15:29:12 UTC
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?
Comment 5 André Klapper 2006-03-22 01:32:18 UTC

*** This bug has been marked as a duplicate of 311512 ***