diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-01-14 17:21:05 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-01-14 17:21:05 +0000 |
commit | df46e177477e50b30d7425c8b7c05c0e54a9113e (patch) | |
tree | 0414c2538f7dbc322f76369a0798f8f5be3180a4 /imap.c | |
parent | 6f98e2a0e0f7cbc4591537e6f0f85ea385cf1451 (diff) | |
download | fetchmail-df46e177477e50b30d7425c8b7c05c0e54a9113e.tar.gz fetchmail-df46e177477e50b30d7425c8b7c05c0e54a9113e.tar.bz2 fetchmail-df46e177477e50b30d7425c8b7c05c0e54a9113e.zip |
Expunge fix.
svn path=/trunk/; revision=759
Diffstat (limited to 'imap.c')
-rw-r--r-- | imap.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -202,12 +202,17 @@ static int imap_trail(FILE *sockfp, struct query *ctl, int number) static int imap_delete(FILE *sockfp, struct query *ctl, int number) /* set delete flag for given message */ { + int ok; + /* use SILENT if possible as a minor throughput optimization */ - return(gen_transact(sockfp, + if ((ok = gen_transact(sockfp, imap4 ? "STORE %d +FLAGS.SILENT (\\Deleted)" : "STORE %d +FLAGS (\\Deleted)", - number)); + number))) + return(ok); + + return(gen_transact(sockfp, "EXPUNGE")); } const static struct method imap = @@ -224,7 +229,6 @@ const static struct method imap = imap_fetch, /* request given message */ imap_trail, /* eat message trailer */ imap_delete, /* set IMAP delete flag */ - "EXPUNGE", /* the IMAP expunge command */ "LOGOUT", /* the IMAP exit command */ }; |