aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2002-12-26 22:06:03 +0000
committerEric S. Raymond <esr@thyrsus.com>2002-12-26 22:06:03 +0000
commit366eb7b3a91d53282f0b1007913a55be236a322e (patch)
treeeaf93bd4f0af17a32223f3a85ed027e365544acc /driver.c
parentdf9d522301cbc3e73e9816485f7deb744ae6f373 (diff)
downloadfetchmail-366eb7b3a91d53282f0b1007913a55be236a322e.tar.gz
fetchmail-366eb7b3a91d53282f0b1007913a55be236a322e.tar.bz2
fetchmail-366eb7b3a91d53282f0b1007913a55be236a322e.zip
Routine updates, including the latest Shetye patch.
svn path=/trunk/; revision=3778
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c37
1 files changed, 14 insertions, 23 deletions
diff --git a/driver.c b/driver.c
index 794d04c8..4a4f4d3f 100644
--- a/driver.c
+++ b/driver.c
@@ -655,25 +655,6 @@ static int fetch_messages(int mailserver_socket, struct query *ctl,
* now.
*/
- /*
- * Tell the UID code we've seen this.
- * Matthias Andree: only register the UID if we could actually
- * forward this mail. If we omit this !suppress_delete check,
- * fetchmail will never retry mail that the local listener
- * refused temporarily.
- */
- if (ctl->newsaved && !suppress_delete)
- {
- struct idlist *sdp;
-
- for (sdp = ctl->newsaved; sdp; sdp = sdp->next)
- if ((sdp->val.status.num == num) && (msgcodes[num-1] >= 0))
- {
- sdp->val.status.mark = UID_SEEN;
- save_str(&ctl->oldsaved, sdp->id,UID_SEEN);
- }
- }
-
/* maybe we delete this message now? */
if (retained)
{
@@ -690,11 +671,10 @@ static int fetch_messages(int mailserver_socket, struct query *ctl,
err = (ctl->server.base_protocol->delete)(mailserver_socket, ctl, num);
if (err != 0)
return(err);
-#ifdef POP3_ENABLE
- delete_str(&ctl->newsaved, num);
-#endif /* POP3_ENABLE */
}
- else if ( (outlevel >= O_VERBOSE) ||
+ else
+ {
+ if ( (outlevel >= O_VERBOSE) ||
/* To avoid flooding the syslog when using --keep,
* report "Skipped message" only when:
* 1) --verbose is on, or
@@ -706,6 +686,17 @@ static int fetch_messages(int mailserver_socket, struct query *ctl,
)
report_complete(stdout, GT_(" not flushed\n"));
+ /* maybe we mark this message as seen now? */
+ if (ctl->server.base_protocol->mark_seen
+ && !suppress_delete
+ && (msgcodes[num-1] >= 0 && ctl->keep))
+ {
+ err = (ctl->server.base_protocol->mark_seen)(mailserver_socket, ctl, num);
+ if (err != 0)
+ return(err);
+ }
+ }
+
/* perhaps this as many as we're ready to handle */
if (maxfetch && maxfetch <= *fetches && *fetches < count)
{