From 3d0ea668e95f5fbd79a04323abc40900d56823f9 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sat, 23 Jul 2005 17:35:47 +0000 Subject: Delete oversized messages with --flush when daemon mode isn't used. Debian Bug#212240. svn path=/trunk/; revision=4173 --- NEWS | 2 ++ driver.c | 13 +++++-------- fetchmail.man | 7 ++++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index d2f3f31c..5a14bd6c 100644 --- a/NEWS +++ b/NEWS @@ -142,6 +142,8 @@ OTHER CHANGES: Matthias Andree * Document that fetchmail may automatically enable UIDL option. Debian Bug#304701. Matthias Andree. +* Delete oversized messages with --flush when daemon mode isn't used. + Debian Bug#212240. Matthias Andree. fetchmail-6.2.5 (Wed Oct 15 18:39:22 EDT 2003), 23079 lines: diff --git a/driver.c b/driver.c index ddae6fc0..e51060c5 100644 --- a/driver.c +++ b/driver.c @@ -543,7 +543,10 @@ static int fetch_messages(int mailserver_socket, struct query *ctl, if ((msgcode == MSGLEN_TOOLARGE) && !check_only) { mark_oversized(ctl, num, msgsize); - suppress_delete = TRUE; + /* we do not want to delete oversized messages in daemon + * mode, but allow deletions in single-pass mode. */ + if (run.poll_interval) + suppress_delete = TRUE; } if (outlevel > O_SILENT) { @@ -772,13 +775,7 @@ flagthemail: else if (ctl->server.base_protocol->delete && !suppress_delete && ((msgcode >= 0 && !ctl->keep) - /* XXX FIXME: Debian's patch uses here: - * - * (msgcode == MSGLEN_OLD || msgcode == - * MSGLEN_TOOLARGE) && ctl->flush - * - * do we want to flush oversized messages? */ - || (msgcode == MSGLEN_OLD && ctl->flush))) + || ((msgcode == MSGLEN_OLD || msgcode == MSGLEN_TOOLARGE) && ctl->flush))) { (*deletions)++; if (outlevel > O_SILENT) diff --git a/fetchmail.man b/fetchmail.man index b5164728..07e52cef 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -487,9 +487,10 @@ marked seen. An explicit --limit of 0 overrides any limits set in your run control file. This option is intended for those needing to strictly control fetch time due to expensive and variable phone rates. Combined with --flush, it can be used to delete oversized messages -waiting on a server. In daemon mode, oversize notifications are -mailed to the calling user (see the --warnings option). This option -does not work with ETRN or ODMR. +waiting on a server UNLESS in daemon mode. In daemon mode, oversize +notifications are mailed to the calling user (see the --warnings +option) and the messages remain on the server. +This option does not work with ETRN or ODMR. .TP .B \-w | \-\-warnings (Keyword: warnings) -- cgit v1.2.3