I don't know if you are reffering to my post, but after your quick fix i still
have the same problem:
(i read my mail with imp)
A new mail arrives, i read it, i MARK it as read, and after refreshing i get
the same pop up that says: you have 1 new message!
-----Αρχικό Μήνυμα-----
Από: Mark Mackay <[EMAIL PROTECTED]>
Θέμα: [Dbmail] Quick fix for the imap vs pop read state
Ημερομηνία: Sat, 28 Sep 2002 18:59:42 +1200
As mentioned in a previous post, I found that if you POPed a mailbox and
kept messages on server, any subsequent imap sessions showed the message
state as unread.
Here's a quick fix (sorry not a patchfile):
In dbmysql, function db_update_pop replace:
snprintf (query,DEF_QUERYSIZE,
"UPDATE messages set status=%llu WHERE message_idnr=%llu AND
status<002",
((struct message *)tmpelement->data)->virtual_messagestatus,
((struct message *)tmpelement->data)->realmessageid);
With
snprintf (query,DEF_QUERYSIZE,
"UPDATE messages set seen_flag=if(%llu=1, 1, seen_flag),
status=%llu WHERE message_idnr=%llu AND status<002",
((struct message *)tmpelement->data)->virtual_messagestatus,
((struct message *)tmpelement->data)->virtual_messagestatus,
((struct message *)tmpelement->data)->realmessageid);
Works for me and should keep the imap state intact if POP doesn't change it,
but I don't think that really should be an issue anyway. The 'better' way to
do it is probably to just use the state column to determine read/unread in
the Imap client, but I didn't want do go and hack away at that if the rfc
called for something else...
/Mark
_______________________________________________
Dbmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail
______________________________________________________________________________________
http://mobile.pathfinder.gr - Pathfinder Mobile logos & Ringtones!
http://www.pathfinder.gr - Δωρεάν mail από τον Pathfinder!