Synced mails are automaticly marked as read

Trouble installing? Post questions and find answers.

Synced mails are automaticly marked as read

Postby toxic-tonic » Wed Feb 13, 2008 12:48 pm

Hi,

next issue! ;)

After I sync over z-push, new (and unread) mails in my inbox ar marked as read. Do others have the same problem or is it once again a problem of my email-provider?

Checked with SVN and SC4, both the same!

Thx

Toxic
toxic-tonic
 
Posts: 10
Joined: Thu Jan 31, 2008 2:13 pm

Re: Synced mails are automaticly marked as read

Postby skummer » Wed Feb 13, 2008 7:55 pm

I've never observed that behaviour. But it's possible that your provider mark them as read when z-push reads the overview by imap.
Sorry, but I think we can't fix this..

Cheers,
Sebastian
skummer
 
Posts: 585
Joined: Mon Sep 24, 2007 5:19 pm
Location: Belo Horizonte / Brasil

Re: Synced mails are automaticly marked as read

Postby adc » Tue Feb 19, 2008 12:09 pm

same here,

mail which are read by z-push are marked as read
adc
 
Posts: 25
Joined: Wed Feb 13, 2008 8:57 pm

Re: Synced mails are automaticly marked as read

Postby adc » Wed Feb 27, 2008 9:50 am

is there nothing that can be done against this behaviour?

i still have this problem and i would love to get off this problem.

where could we start looking for?

my configuration here is dovecot as imap server and mail for exchange versino 2.03 on a symbian phone.

thank you very much in advance
adc
 
Posts: 25
Joined: Wed Feb 13, 2008 8:57 pm

Re: Synced mails are automaticly marked as read

Postby Michael » Wed Feb 27, 2008 10:58 am

adc wrote:is there nothing that can be done against this behaviour?

i still have this problem and i would love to get off this problem.

where could we start looking for?

my configuration here is dovecot as imap server and mail for exchange versino 2.03 on a symbian phone.

thank you very much in advance

In the Z-Push IMAP backend we use the option FT_PEEK when reading the message with imap_body which shouldn't set the message as read.

You may try to add a line like:
Code: Select all
imap_clearflag_full ( $this->_mbox, $id, "\\Seen", FT_UID);


After the reading of the message on line 520 (with the latest SVN version) in the function GetMessage of backend/imap.php
Michael
 
Posts: 51
Joined: Mon Oct 08, 2007 8:10 am

Re: Synced mails are automaticly marked as read

Postby adc » Wed Feb 27, 2008 3:49 pm

thank you very much for your quick reply.

i've made your suggested changes. the effect now is that it marks all the mails as unseen everytime a sync is done.

<code>
$mail = @imap_fetchheader($this->_mbox, $id, FT_PREFETCHTEXT | FT_UID) . @imap_body($this->_mbox, $id, FT_PEEK | FT_UID);

imap_clearflag_full ( $this->_mbox, $id, "\\Seen", FT_UID); //adc

$mobj = new Mail_mimeDecode($mail);
</code>
adc
 
Posts: 25
Joined: Wed Feb 13, 2008 8:57 pm

Re: Synced mails are automaticly marked as read

Postby Michael » Wed Feb 27, 2008 3:52 pm

adc wrote:thank you very much for your quick reply.

i've made your suggested changes. the effect now is that it marks all the mails as unseen everytime a sync is done.

That was quite stupid of me indeed, I didn't think about that :D
But maybe you should look at the configuration of your IMAP server, maybe there is some setting which will set every retrieved message as read even if we request not to do so.
Michael
 
Posts: 51
Joined: Mon Oct 08, 2007 8:10 am

Re: Synced mails are automaticly marked as read

Postby skummer » Wed Feb 27, 2008 4:10 pm

Yeah, I think that's a mailserver configuration.

update: seems to be a bug in dovecot
http://www.dovecot.org/list/dovecot/200 ... 00819.html

Cheers, Sebastian
skummer
 
Posts: 585
Joined: Mon Sep 24, 2007 5:19 pm
Location: Belo Horizonte / Brasil

Re: Synced mails are automaticly marked as read

Postby adc » Wed Feb 27, 2008 5:35 pm

one gentle person from #dovecot irc mentioned that the correct way of reading the body would be this

fetching body.peek[] is the way to do it if you don't want to mark
it as read

a dovecot developer did look into the rawlog dump during a z-push sync, there you could see that z-push or imap php functions do a RFC822.HEADER and RFC822.TEXT in the FETCH command, which it shouldn't it should do a BODY.PEEK[HEADER] and BODY.PEEK[TEXT]

can someone confirm that he sees also RFC822.TEXT or is this a problem of my buggy php-imap ?
adc
 
Posts: 25
Joined: Wed Feb 13, 2008 8:57 pm

Re: Synced mails are automaticly marked as read

Postby skummer » Wed Feb 27, 2008 8:02 pm

Well, we use exclusiveley php-imap. So, if this is wrong, it's wrong in the library.

Anyway, on a lot (the most?) other IMAP servers that seems to work as it should.. :?

CHeers, Sebastian
skummer
 
Posts: 585
Joined: Mon Sep 24, 2007 5:19 pm
Location: Belo Horizonte / Brasil

Next

Return to Bugs

Who is online

Users browsing this forum: MireAssusia and 1 guest

cron