]> Pileus Git - ~andy/fetchmail/commitdiff
Explicit option is documented and set up in the data structure,
authorEric S. Raymond <esr@thyrsus.com>
Wed, 25 Sep 1996 20:02:41 +0000 (20:02 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 25 Sep 1996 20:02:41 +0000 (20:02 -0000)
but doesn't work yet.

svn path=/trunk/; revision=145

fetchmail.c
fetchmail.h
fetchmail.man
rcfile_l.l
rcfile_y.y
sample.rcfile

index f78d149afe252fe9ff9caeceb38dc00b53b1e2f3..51bc92692b871ee17aebfc736c06c9c629008275 100644 (file)
@@ -118,7 +118,7 @@ char **argv;
        append_server_names(&sargc, sargv, sizeof(sargv));
 
     /* build in-core data list on all hosts */
-    while ((servername = getnextserver(sargc, sargv, &parsestatus)) != (char *)0)
+    while ((servername = getnextserver(sargc,sargv,&parsestatus)) != (char *)0)
     {
        if (strcmp(servername, "defaults") == 0)
            continue;
@@ -391,10 +391,13 @@ struct hostrec *queryctl;
 {
     char *cp;
 
+    if (queryctl->explicit || outlevel == O_VERBOSE)
+       printf("  This host will%s be queried when no host is specified.\n",
+              queryctl->explicit ? " not" : "");
     printf("  Username = '%s'\n", queryctl->remotename);
     if (queryctl->password && outlevel == O_VERBOSE)
        printf("  Password = '%s'\n", queryctl->password);
-    if (queryctl->rpopid)
+    if (queryctl->rpopid[0])
        printf("  RPOP id = '%s'\n", queryctl->rpopid);
     printf("  Protocol is %s", showproto(queryctl->protocol));
     if (queryctl->port)
@@ -412,7 +415,7 @@ struct hostrec *queryctl;
     printf("  Old messages will%s be flushed before message retrieval (--flush %s).\n",
           queryctl->flush ? "" : " not",
           queryctl->flush ? "on" : "off");
-    printf("  Rewrite of host-local addresses is %sabled (--norewrite %s)\n",
+    printf("  Rewrite of server-local addresses is %sabled (--norewrite %s)\n",
           queryctl->norewrite ? "dis" : "en",
           queryctl->norewrite ? "on" : "off");
 
index 44dc291776d755773be352a6f7384ffb59083d77..a50e4dd06c5e9079e8211511bb7aa48908db6a27 100644 (file)
@@ -70,6 +70,7 @@ struct hostrec
   int fetchall;
   int flush;
   int norewrite;
+  int explicit;
   int port;
 
   /* state used for tracking UIDL ids */
@@ -79,8 +80,8 @@ struct hostrec
   int output;
   struct hostrec *next;
 
-#if defined(HAVE_APOP_SUPPORT)
   /* internal use only */ 
+#if defined(HAVE_APOP_SUPPORT)
   char digest [DIGESTLEN];
 #endif
 };
index 00eb963334d82b204bbeddc8e30672bec9ba5981..08d4f399e6d30eb074a8746853293db63d739190 100644 (file)
@@ -374,7 +374,7 @@ or
 option allows you to redirect status messages emitted while in daemon
 mode into a specified logfile (follow the option with the logfile name).
 This is primarily useful for debugging configurations.
-.SH THE FETCHRC FILE
+.SH THE RUN CONTROL FILE
 The preferred way to set up fetchmail (and the only way if you want to
 specify a password) is to write a .fetchrc file in your home directory.
 To protect the security of your passwords, your ~/.fetchrc may not have
@@ -404,12 +404,27 @@ Legal keywords are:
     flush
     fetchall
     rewrite
+    explicit
     nokeep
     noflush
     nofetchall
     norewrite
+    noexplicit
     port
 .PP
+All these correspond to the obvuious command-line arguments except
+two: \fBpassword\fR and \fBexplicit\fR.
+.PP
+The \fBpassword\fR option requires a string argument, which is the password
+to be used with the entry's server.
+.PP
+The \fBexplicit\fR option tells
+.I fetchmail 
+not to query this host unless it is explicitly named on the command
+line.  A host entry with this flag will be skipped when
+.I fetchmail
+called with no arguments steps through all hosts in the run control file.
+.PP
 Legal protocol identifiers are
 
     auto (or AUTO)
index 30ce29785e8bdeb6730a155b5bf9cd9b24ce71e5..5ac469d6f7b00cbd4c33b2ede99e336e903d439d 100644 (file)
@@ -38,10 +38,12 @@ keep                { yylval.flag = TRUE; return KW_KEEP; }
 flush          { yylval.flag = TRUE; return KW_FLUSH; }
 fetchall       { yylval.flag = TRUE; return KW_FETCHALL; }
 rewrite                { yylval.flag = TRUE; return KW_REWRITE; }
+explicit       { yylval.flag = TRUE; return KW_EXPLICIT; }
 nokeep         { yylval.flag = FALSE; return KW_KEEP; }
 noflush                { yylval.flag = FALSE; return KW_FLUSH; }
 nofetchall     { yylval.flag = FALSE; return KW_FETCHALL; }
 norewrite      { yylval.flag = FALSE; return KW_REWRITE; }
+noexplicit     { yylval.flag = FALSE; return KW_EXPLICIT; }
 port           { return KW_PORT; }
 
 (auto)|(AUTO)  { yylval.proto = P_AUTO;  return PROTO_AUTO; }
index 1bcf1e4768629539eadbe18b9223714aa564523d..3b90f3f7aef155e303c39908faa1f764ed95e36d 100644 (file)
@@ -33,7 +33,7 @@ int yydebug;  /* in case we didn't generate with -- debug */
 %token KW_REMOTEFOLDER KW_LOCALFOLDER KW_SMTPHOST KW_MDA KW_EOL KW_DEFAULTS
 %token <proto> PROTO_AUTO PROTO_POP2 PROTO_POP3 PROTO_IMAP PROTO_APOP PROTO_RPOP
 %token <sval> PARAM_STRING
-%token <flag> KW_KEEP KW_FLUSH KW_FETCHALL KW_REWRITE KW_PORT
+%token <flag> KW_KEEP KW_FLUSH KW_FETCHALL KW_REWRITE KW_PORT KW_EXPLICIT
 %type <proto> proto;
 
 /* these are actually used by the lexer */
@@ -75,6 +75,7 @@ serv_option_clause:
        |       KW_FLUSH                        {prc_setflush($1);}
        |       KW_FETCHALL                     {prc_setfetchall($1);}
        |       KW_REWRITE                      {prc_setrewrite($1);}
+       |       KW_EXPLICIT                     {prc_setexplicit($1);}
        |       KW_PORT PARAM_STRING            {prc_setport($2);}
   ;
 
index 6329e4537d8c7c177bd05afdd12f3530143fab3c..f7eed18755e77b5dc5d62b97facd759003fc9240 100644 (file)
 #   flush
 #   fetchall
 #   rewrite
+#   explicit
 #   nokeep
 #   noflush
 #   nofetchall
 #   norewrite
+#   noexplicit
 #   port
 #
 # Legal protocol identifiers are