aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-12-27 14:16:02 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-12-27 14:16:02 +0000
commit6d1abe35b139565af4fda8a67e2e9566329057db (patch)
treee9e2f9c0d8825201f6c50c6b1dc12715d4783be1 /imap.c
parent1317f454a87c5e6421e227a5d8918ddbb943bf5d (diff)
downloadfetchmail-6d1abe35b139565af4fda8a67e2e9566329057db.tar.gz
fetchmail-6d1abe35b139565af4fda8a67e2e9566329057db.tar.bz2
fetchmail-6d1abe35b139565af4fda8a67e2e9566329057db.zip
Have IMAP set seen flag if keep is on.
svn path=/trunk/; revision=699
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/imap.c b/imap.c
index f9fdbbaa..e65807ec 100644
--- a/imap.c
+++ b/imap.c
@@ -154,7 +154,7 @@ static int imap_is_old(FILE *sockfp, struct query *ctl, int num)
return(seen);
}
-static int imap_fetch(FILE *sockfp, int number, int *lenp)
+static int imap_fetch(FILE *sockfp, struct query *ctl, int number, int *lenp)
/* request nth message */
{
char buf [POPBUFSIZE+1];
@@ -165,8 +165,12 @@ static int imap_fetch(FILE *sockfp, int number, int *lenp)
* seen flag. This is good! It means that if the protocol exchange
* craps out during the message, it will still be marked `unseen' on
* the server.
+ *
+ * However...*don't* do this if we're using keep to suppress deletion!
+ * In that case, marking the seen flag is the only way to prevent the
+ * message from being re-fetched on subsequent runs.
*/
- if (imap4)
+ if (imap4 && !ctl->keep)
gen_send(sockfp, "FETCH %d RFC822.PEEK", number);
else
gen_send(sockfp, "FETCH %d RFC822", number);