Bug 3004 - (int-94494) Modest pops up even when only read messages are in IMAP inbox
(int-94494)
: Modest pops up even when only read messages are in IMAP inbox
Status: RESOLVED FIXED
Product: Email
General
: 4.1.2 (4.2008.36-5)
: other Maemo
: Low normal with 4 votes (vote)
: 5.0-beta2
Assigned To: unassigned
: modest-bugs
:
: community-diablo, patch
:
:
  Show dependency tree
 
Reported: 2008-03-05 18:14 UTC by bugzilla.5.smicke
Modified: 2009-10-22 07:57 UTC (History)
6 users (show)

See Also:


Attachments
Log receiving a read mail with Modest open (17.83 KB, text/plain)
2008-12-03 20:13 UTC, Daniel Martin Yerga
Details
Log receiving a read mail with Modest closed (13.17 KB, text/plain)
2008-12-03 20:20 UTC, Daniel Martin Yerga
Details
patch fixing the bug (4.56 KB, patch)
2008-12-03 21:42 UTC, Daniel Martin Yerga
Details
patch fixing the bug (4.56 KB, patch)
2008-12-03 21:47 UTC, Daniel Martin Yerga
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description bugzilla.5.smicke (reporter) 2008-03-05 18:14:53 UTC
SOFTWARE VERSION:
Modest W08?

STEPS TO REPRODUCE THE PROBLEM:
Send an email to your account. Read it with another program e.g. thunderbird.
Connect your tablet to the internet, auto-receive email should be on.

EXPECTED OUTCOME:
No pop-up since email has been already marked as read.

ACTUAL OUTCOME:
Modest will pop up a message about new email even though the email has already
been marked as read.


REPRODUCIBILITY:
always

EXTRA SOFTWARE INSTALLED:
-

OTHER COMMENTS:
Comment 1 Chris H 2008-06-17 12:23:55 UTC
I get the same issue with W22
Comment 2 Sergio Villar Senin 2008-06-26 11:36:35 UTC
Which account are you using POP or IMAP?
Comment 3 Chris H 2008-06-26 11:52:06 UTC
I'm on IMAP. POP doesn't support flagging mails as read on the server, does it?

I have 2 thunderbird clients, webmail and modest.  Assuming that modest is
offline, I get a new email and read it in any of the other clients.  Any of the
other clients _will_not_ give me an alert because the mail has been read. 
Launching modest, I will then get a new mail notification for the read email.

Thanks
Comment 4 Chris H 2008-09-09 10:41:02 UTC
any movement on this?
Comment 5 Andre Klapper maemo.org 2008-10-02 13:38:07 UTC
Chris: Private IMAP server (if so, which product and version? UW IMAP, Courier,
Cyrus, Dovecot?) or a public one?

A debug log of the connection to the mail server might help (well - even if it
only shows that Modest recognizes the mail as UNREAD)
Please start a X Terminal window and enter
    export "CAMEL_DEBUG"="all"
to enable the debug mode of the mail library. After that, enter
    /usr/bin/maemo-summoner /usr/bin/modest.launch showui > log 2>&1
to start the email application. Then connect to the mail server. Attach the
logfile named "log" here (please check for confidential data before attaching).
Comment 6 Chris H 2008-11-05 22:48:23 UTC
My mail server is a private one, running exim and dovecot. I will try and get a
debug log.  However, doesn't IMAP have a "Seen" flag, which might be more
appropriate for this?  That way, if I have thunderbird running on my desktop
and it receives the mail, I won't get alerted on the n800 even if I've not read
it?  Maybe this could be configurable?
Comment 7 Daniel Martin Yerga 2008-12-03 12:01:25 UTC
*** This bug has been confirmed by popular vote. ***
Comment 8 Daniel Martin Yerga 2008-12-03 12:05:24 UTC
Well, the bug was confirmed automatically for my vote, but I was going to
confirm it manually.

This bug is easy to trigger, and I am suffering it too. Not a big problem
because I know the emails I have read, but it's a bug anyway.

I'll upload a log this afternoon.
Comment 9 Daniel Martin Yerga 2008-12-03 20:10:52 UTC
I'm using GMail with IMAP and Modest version 1.0-2008.35-1

Because if it wasn't clear as trigger the bug, I am going to explain it:

1) Put Modest to receive mails automatically every X minutes.
2) Close Modest
3) Send a new mail from another account.
4) Before receive this new mail in Modest, read it with another client.
5) Wait until the next time when Modest search for new mails.
6) Modest show a notification (led + icon in the Task Navigator) with the new
mail though this mail is read.

If you have Modest open, it sees the new mail as read, and then there isn't the
cool notification.
Comment 10 Daniel Martin Yerga 2008-12-03 20:13:29 UTC
Created an attachment (id=1060) [details]
Log receiving a read mail with Modest open

The log is get with: /usr/bin/maemo-summoner /usr/bin/modest.launch showui >
log 2>&1

It launches Modest and when the read mail is received, all is OK. Here, the bug
doesn't happen.
Comment 11 Daniel Martin Yerga 2008-12-03 20:20:03 UTC
Created an attachment (id=1061) [details]
Log receiving a read mail with Modest closed

This log was got with: /usr/bin/maemo-summoner /usr/bin/modest.launch > log
2>&1

When the read mail is received, the notification is shown.
The part of the log where the mail is received is very similar. 

My assumption is that Modest notify always that there is a new mail in the
INBOX and doesn't look the state of the mail. But I could be wrong, so I'll
have to look the code ;)
Comment 12 Daniel Martin Yerga 2008-12-03 21:42:37 UTC
Created an attachment (id=1062) [details]
patch fixing the bug

With the attached patch, Modest only shows the notification when an mail isn't
read.
If there is more than one, the notification only shows the unread ones.

Really the code is only 4 lines, but in the patch it seems more because I am
using an "if" and I have indented the code down of the "if" to follow with the
structure of the rest of the code.
Comment 13 Daniel Martin Yerga 2008-12-03 21:47:32 UTC
Created an attachment (id=1063) [details]
patch fixing the bug

Sorry for spamming, I uploaded a bad patch, this is the right ;)
Comment 14 José Dapena Paz 2009-05-06 21:11:20 UTC
Committed fix for this in modest git master 07e4d11...

Instead of using the patch (thanks Daniel for the effort anyway!), I've took a
different approach, that should also avoid blinking leds for already seen
messages, and be valid for all the platforms and not platform specific.

Setting TM to be fremantle
Comment 15 Andre Klapper maemo.org 2009-07-14 13:38:16 UTC
Fix should be included in Fremantle SDK beta 2 hence updating Target Milestone.
If you are the reporter of this bug: Feel free to verify the fix if possible.
Comment 16 Lucas Maneos 2009-10-22 07:57:09 UTC
Marking patches of interest to Diablo (Maemo4) community updates, please excuse
the noise.