aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 9652dab3..8438c42e 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -750,6 +750,18 @@ 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.names->id);
+ return PS_NOMAIL;
+ }
+ }
+
if (outlevel == O_VERBOSE)
{
time_t now;
@@ -800,6 +812,9 @@ void dump_params (struct query *ctl)
printf(" Logfile is %s\n", logfile);
if (poll_interval)
printf(" Poll interval is %d seconds\n", poll_interval);
+ if (ctl->server.interval)
+ printf(" Poll of this server will occur every %d intervals.\n",
+ ctl->server.interval);
#ifdef HAVE_GETHOSTBYNAME
if (ctl->server.canonical_name)
printf(" Canonical DNS name of server is %s.\n", ctl->server.canonical_name);