aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-10-16 13:01:06 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-10-16 13:01:06 +0000
commit580682dcaae8305ac9ca9c5e1011ef963d86f5d1 (patch)
tree8d5ccac1987c1e986400daa4f5a411bde885ecf9 /fetchmail.c
parent380a2d1a3a08c38a6280e1a1bc376a4c3b79e21d (diff)
downloadfetchmail-580682dcaae8305ac9ca9c5e1011ef963d86f5d1.tar.gz
fetchmail-580682dcaae8305ac9ca9c5e1011ef963d86f5d1.tar.bz2
fetchmail-580682dcaae8305ac9ca9c5e1011ef963d86f5d1.zip
Now we can use --limit with daemon mode.
svn path=/trunk/; revision=2091
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/fetchmail.c b/fetchmail.c
index a9d737c9..6a53499b 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -765,6 +765,7 @@ static void optmerge(struct query *h2, struct query *h1, int force)
FLAG_MERGE(dropstatus);
FLAG_MERGE(mimedecode);
FLAG_MERGE(limit);
+ FLAG_MERGE(warnings);
FLAG_MERGE(fetchlimit);
FLAG_MERGE(batchlimit);
FLAG_MERGE(expunge);
@@ -786,6 +787,7 @@ static int load_params(int argc, char **argv, int optind)
def_opts.server.protocol = P_AUTO;
def_opts.server.timeout = CLIENT_TIMEOUT;
+ def_opts.warnings = WARNING_INTERVAL;
def_opts.remotename = user;
def_opts.expunge = 1;
@@ -883,13 +885,6 @@ static int load_params(int argc, char **argv, int optind)
if (!ctl->smtphunt)
save_str(&ctl->smtphunt, fetchmailhost, FALSE);
- /* keep lusers from shooting themselves in the foot :-) */
- if (run.poll_interval && ctl->limit)
- {
- fprintf(stderr,"fetchmail: you'd never see large messages!\n");
- exit(PS_SYNTAX);
- }
-
/* if `user' doesn't name a real local user, try to run as root */
if ((pw = getpwnam(user)) == (struct passwd *)NULL)
ctl->uid = 0;
@@ -1318,10 +1313,18 @@ void dump_params (struct runctl *runp, struct query *querylist, flag implicit)
ctl->dropstatus ? "discarded" : "kept",
ctl->dropstatus ? "on" : "off");
if (NUM_NONZERO(ctl->limit))
- printf(" Message size limit is %d bytes (--limit %d).\n",
- ctl->limit, ctl->limit);
- else if (outlevel == O_VERBOSE)
- printf(" No message size limit (--limit 0).\n");
+ {
+ if (NUM_NONZERO(ctl->limit))
+ printf(" Message size limit is %d bytes (--limit %d).\n",
+ ctl->limit, ctl->limit);
+ else if (outlevel == O_VERBOSE)
+ printf(" No message size limit (--limit 0).\n");
+ if (run.poll_interval > 0)
+ printf(" Message size warning interval is %d seconds (--warnings %d).\n",
+ ctl->warnings, ctl->warnings);
+ else if (outlevel == O_VERBOSE)
+ printf(" Size warnings on every poll (--warnings 0).\n");
+ }
if (NUM_NONZERO(ctl->fetchlimit))
printf(" Received-message limit is %d (--fetchlimit %d).\n",
ctl->fetchlimit, ctl->fetchlimit);