* `interface' and `monitor' options are now per-server.
+* `batchlimit' option is now per-user.
+
+Note: These changes mean that older .fetchmailrc files using the `set'
+syntax for these options will cause fetchmail to die with a parse
+error at initialization time. Conversion is trivial -- for details,
+see the FAQ.
+
bugs --
* Stricter parsing of greeting message for the host name; eliminates some
int use_syslog; /* if --syslog was set */
int quitmode; /* if --quit was set */
int check_only; /* if --probe was set */
-int cmd_batchlimit; /* if --batchlimit was set */
-int cmd_fetchlimit; /* if --fetchlimit was set */
char *cmd_logfile; /* if --logfile was set */
/* miscellaneous global controls */
printf(" and %s\n", rcfile);
if (outlevel == O_VERBOSE)
printf("Lockfile at %s\n", tmpbuf);
- if (batchlimit)
- printf("SMTP message batch limit is %d.\n", batchlimit);
- else if (outlevel == O_VERBOSE)
- printf("No SMTP message batch limit.\n");
for (ctl = querylist; ctl; ctl = ctl->next) {
if (ctl->active && !(implicitmode && ctl->server.skip))
dump_params(ctl);
else
initialize_saved_lists(querylist, idfile);
- /* if cmd_batchlimit was explicitly set, use it to override batchlimit */
- if (cmd_batchlimit > -1)
- batchlimit = cmd_batchlimit;
-
/* if cmd_logfile was explicitly set, use it to override logfile */
if (cmd_logfile)
logfile = cmd_logfile;
ctl->fetchlimit, ctl->fetchlimit);
else if (outlevel == O_VERBOSE)
printf(" No received-message limit (--fetchlimit 0).\n");
+ if (ctl->batchlimit)
+ printf(" SMTP message batch limit is %d.\n", ctl->batchlimit);
+ else if (outlevel == O_VERBOSE)
+ printf(" No SMTP message batch limit.\n");
if (ctl->mda)
printf(" Messages will be delivered with '%s.'\n", visbuf(ctl->mda));
else
int norewrite;
int limit;
int fetchlimit;
+ int batchlimit;
/* unseen, previous state of mailbox (initially from .fetchids) */
struct idlist *oldsaved, *newsaved;
extern int use_syslog; /* if --syslog was set */
extern int quitmode; /* if --quit was set */
extern int check_only; /* if --check was set */
-extern int cmd_batchlimit; /* if --batchlimit was set */
extern char *cmd_logfile; /* if --logfile was set */
/* these get computed */
-extern int batchlimit; /* if --batchlimit was set */
extern int batchcount; /* count of messages sent in current batch */
extern int peek_capable; /* can we read msgs without setting seen? */
.PP
For backward compatibility, the word `server' is a synonym for `poll'.
.PP
-There are currently two valid global option statements; \&`set
-batchlimit = ' followed by a number and sets the same global specified
-by the --batchlimit option, and `set logfile = ' followed by a string
-sets the same global specified by --logfile. In both cases, a
-command-line option will override.
+There is currently just one global option statement; `set logfile = '
+followed by a string sets the same global specified by --logfile. A
+command-line --logfile option will override this.
.PP
Basic format is:
int option_index;
memset(ctl, '\0', sizeof(struct query)); /* start clean */
- cmd_batchlimit = -1;
while (!errflag &&
(c = getopt_long(argc,argv,shortoptions,
break;
case 'b':
case LA_BATCHLIMIT:
- cmd_batchlimit = atoi(optarg);
+ ctl->batchlimit = atoi(optarg);
break;
case 'B':
case LA_FETCHLIMIT:
;
/* future global options should also have the form SET <name> <value> */
-statement : SET BATCHLIMIT MAP NUMBER {batchlimit = $4;}
- | SET LOGFILE MAP STRING {logfile = xstrdup($4);}
+statement : SET LOGFILE MAP STRING {logfile = xstrdup($4);}
/*
* The way the next two productions are written depends on the fact that
| REWRITE {current.norewrite = ($1==FLAG_TRUE);}
| LIMIT NUMBER {current.limit = $2;}
| FETCHLIMIT NUMBER {current.fetchlimit = $2;}
+ | BATCHLIMIT NUMBER {current.batchlimit = $2;}
;
%%
FLAG_FORCE(norewrite);
FLAG_FORCE(limit);
FLAG_FORCE(fetchlimit);
+ FLAG_FORCE(batchlimit);
#undef FLAG_FORCE
(void) hostalloc(¤t);
FLAG_MERGE(norewrite);
FLAG_MERGE(limit);
FLAG_MERGE(fetchlimit);
+ FLAG_MERGE(batchlimit);
#undef FLAG_MERGE
}
# norewrite
# limit -- must be followed by numeric size limit
# fetchlimit -- must be followed by numeric msg fetch limit
+# batchlimit -- must be followed by numeric SMTP batch limit
#
# Legal protocol identifiers are
# pop2 (or POP2)
#
# Legal global option statements are
#
-# set batchlimit = -- must be followed by a number
# set logfile = -- must be followed by a string
#
# The noise keywords `and', `with', `has', `wants', and `options' are ignored
#
# This is what the developer's .fetchmailrc looks like:
-set batchlimit = 0 # I forward to sendmail
-
defaults
interface "sl0/10.0.2.15" # SLIRP standard address
user esr is esr fetchmail-friends magic-numbers here