aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-05-22 18:42:39 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-05-22 18:42:39 +0000
commit703f7886706bd5a7fc34db647edb3fbea5553c0a (patch)
treec66d018293eacfff8a838934e9e28478ac4d8ab3
parent0a337ef438e4c5902171516e76666869a87747c6 (diff)
downloadfetchmail-703f7886706bd5a7fc34db647edb3fbea5553c0a.tar.gz
fetchmail-703f7886706bd5a7fc34db647edb3fbea5553c0a.tar.bz2
fetchmail-703f7886706bd5a7fc34db647edb3fbea5553c0a.zip
Added idfile.
svn path=/trunk/; revision=1794
-rw-r--r--Makefile.in2
-rw-r--r--NEWS3
-rw-r--r--fetchmail.c5
-rw-r--r--fetchmail.man1
-rw-r--r--options.c4
-rw-r--r--rcfile_l.l1
-rw-r--r--rcfile_y.y3
7 files changed, 14 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in
index cb61a78c..47080d98 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3,7 +3,7 @@
# If you're running QNX, we can't assume a working autoconf.
# So just uncomment all the lines marked QNX.
-VERS=4.4.6
+VERS=4.4.7
# Ultrix 2.2 make doesn't expand the value of VPATH.
srcdir = @srcdir@
diff --git a/NEWS b/NEWS
index 89e0177f..ef3d989f 100644
--- a/NEWS
+++ b/NEWS
@@ -13,10 +13,11 @@ fetchmail-4.4.7 ()
* Gunther Leber's fix to processing of command-line options.
* George Colouris's second try at NetBSD autoconfiguration.
* Bruce Mah's fix for core dump in command-line host specification.
+* Missing `idfile' declaration added to .fetchmailrc processing.
* Mimedecode default turned off pending a fix for the PGP-signature-
munging bug.
-There are 270 people on fetchmail-friends and 212 on fetchmail-announce.
+There are 270 people on fetchmail-friends and 216 on fetchmail-announce.
fetchmail-4.4.6 (Sat May 16 14:16:49 EDT 1998)
* Fix a bug introduced by my 4.4.5 bug-fix release :-(
diff --git a/fetchmail.c b/fetchmail.c
index 63d4cdc8..2da20e4c 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -62,6 +62,7 @@ flag nodetach; /* if TRUE, don't detach daemon process */
flag quitmode; /* if --quit was set */
flag check_only; /* if --probe was set */
char *cmd_logfile; /* if --logfile was set */
+char *cmd_idfile; /* if --idfile was set */
int cmd_daemon; /* if --daemon was set */
/* miscellaneous global controls */
@@ -838,6 +839,10 @@ static int load_params(int argc, char **argv, int optind)
if (cmd_logfile)
logfile = cmd_logfile;
+ /* if cmd_idfile was explicitly set, use it to override idfile */
+ if (cmd_idfile)
+ logfile = cmd_idfile;
+
/* likewise for poll_interval */
if (cmd_daemon >= 0)
poll_interval = cmd_daemon;
diff --git a/fetchmail.man b/fetchmail.man
index b607f016..0484e779 100644
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -356,6 +356,7 @@ run control file. Unless the --version option is also on, the file must have
permissions no more open than 0600 (u=rw,g=,o=) or else be /dev/null.
.TP
.B \-i pathname, --idfile pathname
+(Keyword: idfile)
Specify an alternate name for the .fetchids file used to save POP3
UIDs.
.TP
diff --git a/options.c b/options.c
index 221574d8..bf42c1fd 100644
--- a/options.c
+++ b/options.c
@@ -191,8 +191,8 @@ struct query *ctl; /* option record to be initialized */
break;
case 'i':
case LA_IDFILE:
- idfile = (char *) xmalloc(strlen(optarg)+1);
- strcpy(idfile,optarg);
+ cmd_idfile = (char *) xmalloc(strlen(optarg)+1);
+ strcpy(cmd_idfile,optarg);
break;
case 'p':
case LA_PROTOCOL:
diff --git a/rcfile_l.l b/rcfile_l.l
index 0c8e5edf..58fe10a0 100644
--- a/rcfile_l.l
+++ b/rcfile_l.l
@@ -23,6 +23,7 @@ int prc_lineno = 1;
set { return SET; }
logfile { return LOGFILE; }
+idfile { return IDFILE; }
daemon { return DAEMON; }
syslog { return SYSLOG; }
invisible { return INVISIBLE; }
diff --git a/rcfile_y.y b/rcfile_y.y
index cd421f47..2427459b 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -67,7 +67,7 @@ extern char * yytext;
%token SPAMRESPONSE PRECONNECT POSTCONNECT LIMIT
%token IS HERE THERE TO MAP WILDCARD
%token BATCHLIMIT FETCHLIMIT EXPUNGE
-%token SET LOGFILE DAEMON SYSLOG INVISIBLE NETSEC INTERFACE MONITOR
+%token SET LOGFILE DAEMON SYSLOG IDFILE INVISIBLE NETSEC INTERFACE MONITOR
%token <proto> PROTO
%token <sval> STRING
%token <number> NUMBER
@@ -88,6 +88,7 @@ optmap : MAP | /* EMPTY */;
/* future global options should also have the form SET <name> optmap <value> */
statement : SET LOGFILE optmap STRING {logfile = xstrdup($4);}
+ | SET IDFILE optmap STRING {idfile = xstrdup($4);}
| SET DAEMON optmap NUMBER {poll_interval = $4;}
| SET SYSLOG {errors_to_syslog = TRUE;}
| SET INVISIBLE {use_invisible = TRUE;}