make
This will compile fetchmail for your system. Note that in order to
-build it, you'll need either flex at version 2.5.3 or greater, or lex.
+build it, you may find you need flex at version 2.5.3 or greater. The
+stock lex distributed with Linux does not work -- it yields a parser
+which core-dumps on syntax errors.
If mxget.c fails to compile, your DNS-query support isn't compatible
with BSD's and Linux's. Manually undefine HAVE_GETHOSTBYNAME in
/* perhaps we just want to check options? */
if (versioninfo) {
- printf("Taking options from command line");
- if (access(rcfile, 0))
- printf("\n");
- else
- printf(" and %s\n", rcfile);
- if (outlevel == O_VERBOSE)
- printf("Lockfile at %s\n", tmpbuf);
+ printf("Taking options from command line");
+ if (access(rcfile, 0))
+ printf("\n");
+ else
+ 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
+ printf("No SMTP message batch limit.\n");
for (ctl = querylist; ctl; ctl = ctl->next) {
if (ctl->active && !(implicitmode && ctl->skip))
dump_params(ctl);
&& ctl->authenticate == A_KERBEROS)
printf(" Protocol is KPOP");
else
- {
printf(" Protocol is %s", showproto(ctl->protocol));
- }
if (ctl->port)
printf(" (using port %d)", ctl->port);
else if (outlevel == O_VERBOSE)
extern char *logfile; /* log file for daemon mode */
extern int quitmode; /* if --quit was set */
extern int check_only; /* if --check was set */
+extern int batchlimit; /* if --batchlimit was set */
/* miscellaneous global controls */
extern char *rcfile; /* path name of rc file */
void escapes(const char *, char *);
-void yyerror(const char *);
+void yyerror(char *);
int yylex();
#else
mail headers and want to know they can prevent it, but it is generally
not a good idea to actually turn off rewrite.)
.TP
+.B -b, --batchlimit
+Specify the maximum number of messages that will be shipped to an SMTP
+listener before the connection is deliberately torn down and rebuilt
+(defaults to 0, meaning no limit). While \fBsendmail\fR(8) normally
+initiates delivery of a message immediately after receiving the
+message terminator, some SMTP listeners are not so prompt. MTAs like
+\fIqmail\fR(8) and \fsmail\fR(8) will wait till the delivery socket is
+shut down to deliver. This may produce annoying delays when
+.IR fetchmail (8)
+is processing very large batches. Setting the batch limit to some
+nonzero size will prevent these delays.
+.TP
.B \-V, --version
Displays the version information for your copy of
.I fetchmail.
is called with no arguments.
.PP
Comments begin with a '#' and extend through the end of the line.
-Otherwise the file consists of a series of free-format server entries.
+Otherwise the file consists of a series of free-format server entries
+or global option statement.
+.PP
Any amount of whitespace separates keywords, tokens, or strings in
server entries, but is otherwise ignored (except that whitespace
enclosed in double quotes is treated as part of the string). Keywords
.PP
For backward compatibility, the word `server' is a syninym for `poll'.
.PP
+There is currently only one valid global option statement; it is
+\&`set batchlimit = ' followed by a number and sets the same global
+specified by the --batchlimit option. (The command line option
+can override this.)
+.PP
Basic format is:
.nf
int prc_lineno = 1;
%}
-%o 4000
+/* this doesn't work with Linux lex, see the INSTALL file */
+%o 5000
+%a 2100
%%
+set { return SET; }
+batchlimit { return BATCHLIMIT; }
defaults { return DEFAULTS; }
server { return POLL; }
poll { return POLL; }
%token DEFAULTS POLL PROTOCOL AUTHENTICATE TIMEOUT KPOP KERBEROS
%token USERNAME PASSWORD FOLDER SMTPHOST MDA IS HERE THERE TO MAP LIMIT
+%token SET BATCHLIMIT
%token <proto> PROTO
%token <sval> STRING
%token <number> NUMBER
| statement_list statement
;
-statement : define_server serverspecs userspecs
+/* future global options should also have the form SET <name> <value> */
+statement : define_server serverspecs userspecs
+ | SET BATCHLIMIT MAP NUMBER {batchlimit = $4;}
;
define_server : POLL STRING {strcpy(current.servername, $2);}
void yyerror (s)
/* report a syntax error */
-const char *s; /* error string */
+char *s; /* error string */
{
- fprintf(stderr,"%s line %d: %s at %s\n", rcfile, prc_lineno, s, yytext);
- prc_errflag++;
+ fprintf(stderr,"%s line %d: %s at %s\n", rcfile, prc_lineno, s, yytext);
+ prc_errflag++;
}
int prc_filecheck(pathname)
# login
# kerberos
#
+# Legal global option statements are
+#
+# set batchlimit = -- must be followed by a number
+#
# The noise keywords `and', `with', `has', `wants', and `options' are ignored
# anywhere in an entry; they can be used to make it resemble English. The
# punctuation charactes `,' `:' `;' are also ignored.
#
# This is what the developer's .fetchmailrc looks like:
+set batchlimit 0 # I forward to sendmail
+
defaults password not_blowing_my_cover;
# Use this for production