diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | fetchmail.c | 25 |
2 files changed, 15 insertions, 13 deletions
@@ -12,7 +12,7 @@ * Use the libmd functions for md5 under Free BSD? (Low priority.) -* Make interval count polls skipped because of interface or monitor option? +* Send notification mail on messages skipped due to --limit? Other TO-DO items: @@ -24,6 +24,7 @@ fetchmail-4.0.7 () * Fixed a minor bug in handling of DNS errors in multidrop mode. * Added a `postconnect' analogous to `preconnect'. +* Make `interval' count polls skipped because of interface or monitor option. There are 258 people on the fetchmail-friends list. diff --git a/fetchmail.c b/fetchmail.c index 715e7246..dacf254b 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -350,6 +350,19 @@ int main (int argc, char **argv) { if (ctl->active && !(implicitmode && ctl->server.skip)) { + /* check skip interval first so that it counts all polls */ + if (poll_interval && ctl->server.interval) + { + if (ctl->server.poll_count++ % ctl->server.interval) + { + if (outlevel == O_VERBOSE) + fprintf(stderr, + "fetchmail: interval not reached, not querying %s\n", + ctl->server.pollname); + continue; + } + } + #ifdef linux /* interface_approve() does its own error logging */ if (!interface_approve(&ctl->server)) @@ -740,18 +753,6 @@ static int query_host(struct query *ctl) { int i, st; - if (poll_interval && ctl->server.interval) - { - if (ctl->server.poll_count++ % ctl->server.interval) - { - if (outlevel == O_VERBOSE) - fprintf(stderr, - "fetchmail: interval not reached, not querying %s\n", - ctl->server.pollname); - return PS_NOMAIL; - } - } - if (outlevel == O_VERBOSE) { time_t now; |