diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-12-27 14:16:02 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-12-27 14:16:02 +0000 |
commit | 6d1abe35b139565af4fda8a67e2e9566329057db (patch) | |
tree | e9e2f9c0d8825201f6c50c6b1dc12715d4783be1 | |
parent | 1317f454a87c5e6421e227a5d8918ddbb943bf5d (diff) | |
download | fetchmail-6d1abe35b139565af4fda8a67e2e9566329057db.tar.gz fetchmail-6d1abe35b139565af4fda8a67e2e9566329057db.tar.bz2 fetchmail-6d1abe35b139565af4fda8a67e2e9566329057db.zip |
Have IMAP set seen flag if keep is on.
svn path=/trunk/; revision=699
-rw-r--r-- | driver.c | 2 | ||||
-rw-r--r-- | imap.c | 8 | ||||
-rw-r--r-- | pop2.c | 2 | ||||
-rw-r--r-- | pop3.c | 2 |
4 files changed, 9 insertions, 5 deletions
@@ -1021,7 +1021,7 @@ const struct method *proto; /* protocol method table */ else { /* request a message */ - ok = (protocol->fetch)(sockfp, num, &len); + ok = (protocol->fetch)(sockfp, ctl, num, &len); if (ok != 0) goto cleanUp; vtalarm(ctl->timeout); @@ -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); @@ -92,7 +92,7 @@ static int pop2_getrange(FILE *sockfp, struct query *ctl, int*countp, int*newp) return(0); } -static int pop2_fetch(FILE *sockfp, int number, int *lenp) +static int pop2_fetch(FILE *sockfp, struct query *ctl, int number, int *lenp) /* request nth message */ { int ok; @@ -239,7 +239,7 @@ static int pop3_is_old(FILE *sockfp, struct query *ctl, int num) str_find (&ctl->newsaved, num))); } -static int pop3_fetch(FILE *sockfp, int number, int *lenp) +static int pop3_fetch(FILE *sockfp, struct query *ctl, int number, int *lenp) /* request nth message */ { int ok; |