aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2007-12-26 23:24:32 +0000
committerMatthias Andree <matthias.andree@gmx.de>2007-12-26 23:24:32 +0000
commit1db90e6d2b3774dfedb84f7de1e515a767336cee (patch)
treeae9726367c5d35a5c13a28056e784cc17d4d423b /imap.c
parentd583c6119a4be8ccf08cb82b47542d00b2ab47a3 (diff)
downloadfetchmail-1db90e6d2b3774dfedb84f7de1e515a767336cee.tar.gz
fetchmail-1db90e6d2b3774dfedb84f7de1e515a767336cee.tar.bz2
fetchmail-1db90e6d2b3774dfedb84f7de1e515a767336cee.zip
Fix Berlios Bug #11797, imap_mark_seen doesn't consider expunged messages
(and marks the wrong messages seen after expunges, leading to data loss in 'keep flush' configurations). Report and patch by Alexander Cherepanov. Thanks\! svn path=/branches/BRANCH_6-3/; revision=5147
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/imap.c b/imap.c
index 053b607c..ec097eb5 100644
--- a/imap.c
+++ b/imap.c
@@ -1240,6 +1240,10 @@ static int imap_mark_seen(int sock, struct query *ctl, int number)
/* mark the given message as seen */
{
(void)ctl;
+
+ /* expunges change the message numbers */
+ number -= expunged;
+
return(gen_transact(sock,
imap_version == IMAP4
? "STORE %d +FLAGS.SILENT (\\Seen)"