Release Notes:
+------------------------------------------------------------------------------
+fetchmail-3.9 ()
+
+features --
+
+* It is now possible to set a default poll interval with `set daemon'.
+
+There are 249 people on the fetchmail-friends list.
+
------------------------------------------------------------------------------
fetchmail-3.8 (Fri Mar 7 17:34:02 EST 1997)
* More FAQ material on using `localdomains'.
-* compilation hacks for ISC 4.0 (thanks, Larry Jones!).
+* Compilation hacks for ISC 4.0 (thanks, Larry Jones!).
bugs --
-* enabled ETRN and RPOP command-line options.
+* Enabled ETRN and RPOP command-line options.
-* yet another attempt to fix the error.c compilation problems under
+* Yet another attempt to fix the error.c compilation problems under
Solaris and NEXTSTEP.
-* handle \( and \) correctly in RFC822 comments, thanks to Gareth McCaughan.
+* Handle \( and \) correctly in RFC822 comments, thanks to Gareth McCaughan.
* Fixed off-by-one error fingered by Brian Jones that prevented
`localdomains' from working.
+There are 248 people on the fetchmail-friends list.
+
------------------------------------------------------------------------------
fetchmail-3.7 (Fri Feb 21 17:38:40 EST 1997)
int quitmode; /* if --quit was set */
int check_only; /* if --probe was set */
char *cmd_logfile; /* if --logfile was set */
+int cmd_daemon; /* if --daemon was set */
/* miscellaneous global controls */
char *rcfile; /* path name of rc file */
if (cmd_logfile)
logfile = cmd_logfile;
+ /* likewise for poll_interval */
+ if (cmd_daemon >= 0)
+ poll_interval = cmd_daemon;
+
return(implicitmode);
}
{
printf("Options for retrieving from %s@%s:\n",
ctl->remotename, visbuf(ctl->server.names->id));
+
+ if (logfile)
+ printf(" Logfile is %s\n", logfile);
+ if (poll_interval)
+ printf(" Poll interval is %d seconds\n", poll_interval);
#ifdef HAVE_GETHOSTBYNAME
if (ctl->server.canonical_name)
printf(" Canonical DNS name of server is %s.\n", ctl->server.canonical_name);
extern int quitmode; /* if --quit was set */
extern int check_only; /* if --check was set */
extern char *cmd_logfile; /* if --logfile was set */
+extern int cmd_daemon; /* if --daemon was set */
/* these get computed */
extern int batchcount; /* count of messages sent in current batch */
.PP
For backward compatibility, the word `server' is a synonym for `poll'.
.PP
-There is currently just one global option statement; `set logfile = '
+There are currently two global option statements; `set logfile = '
followed by a string sets the same global specified by --logfile. A
-command-line --logfile option will override this.
+command-line --logfile option will override this. Also, `set daemon'
+sets the poll interval as --daemon does. This can be overridden by
+a command-line --daemon option; iin particular --daemon 0 can be used
+to force foreground operation.
.PP
Basic format is:
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <net/if.h>
+#include "config.h"
#include "fetchmail.h"
typedef struct {
*cp2++ = '\000';
/* convert IP address and netmask */
- hp->interface_pair = xmalloc(sizeof(struct interface_pair_s));
+ hp->interface_pair = (struct interface_pair_s *)xmalloc(sizeof(struct interface_pair_s));
if (!inet_aton(cp1, &hp->interface_pair->interface_address))
(void) error(PS_SYNTAX, 0, "invalid IP interface address");
if (!inet_aton(cp2, &hp->interface_pair->interface_mask))
int errflag = 0; /* TRUE when a syntax error is detected */
int option_index;
+ cmd_daemon = -1;
+
memset(ctl, '\0', sizeof(struct query)); /* start clean */
while (!errflag &&
break;
case 'd':
case LA_DAEMON:
- poll_interval = atoi(optarg);
+ cmd_daemon = atoi(optarg);
break;
case 'N':
case LA_NODETACH:
batchlimit { return BATCHLIMIT; }
fetchlimit { return FETCHLIMIT; }
logfile { return LOGFILE; }
-interface { return INTERFACE; }
-monitor { return MONITOR; }
+daemon { return DAEMON; }
defaults { return DEFAULTS; }
server { return POLL; }
smtp(host)? { return SMTPHOST; }
mda { return MDA; }
pre(connect) { return PRECONNECT; }
+interface { return INTERFACE; }
+monitor { return MONITOR; }
is { return IS; }
here { return HERE; }
%token AUTHENTICATE TIMEOUT KPOP KERBEROS
%token ENVELOPE USERNAME PASSWORD FOLDER SMTPHOST MDA PRECONNECT LIMIT
%token IS HERE THERE TO MAP WILDCARD
-%token SET BATCHLIMIT FETCHLIMIT LOGFILE INTERFACE MONITOR
+%token SET BATCHLIMIT FETCHLIMIT LOGFILE DAEMON INTERFACE MONITOR
%token <proto> PROTO
%token <sval> STRING
%token <number> NUMBER
/* future global options should also have the form SET <name> <value> */
statement : SET LOGFILE MAP STRING {logfile = xstrdup($4);}
+ | SET DAEMON NUMBER {poll_interval = $3;}
/*
* The way the next two productions are written depends on the fact that
# Legal global option statements are
#
# set logfile = -- must be followed by a string
+# set daemon = -- 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
#
# This is what the developer's .fetchmailrc looks like:
+set daemon 300 # Poll at 5-minute intervals
+
defaults
interface "sl0/10.0.2.15" # SLIRP standard address
user esr is esr fetchmail-friends magic-numbers here