diff options
| -rw-r--r-- | fetchmail.c | 9 | ||||
| -rw-r--r-- | fetchmail.h | 3 | ||||
| -rw-r--r-- | fetchmail.man | 17 | ||||
| -rw-r--r-- | rcfile_l.l | 2 | ||||
| -rw-r--r-- | rcfile_y.y | 3 | ||||
| -rw-r--r-- | sample.rcfile | 2 | 
6 files changed, 30 insertions, 6 deletions
diff --git a/fetchmail.c b/fetchmail.c index f78d149a..51bc9269 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -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"); diff --git a/fetchmail.h b/fetchmail.h index 44dc2917..a50e4dd0 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -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  }; diff --git a/fetchmail.man b/fetchmail.man index 00eb9633..08d4f399 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -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) @@ -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; } @@ -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);}    ; diff --git a/sample.rcfile b/sample.rcfile index 6329e453..f7eed187 100644 --- a/sample.rcfile +++ b/sample.rcfile @@ -32,10 +32,12 @@  #   flush  #   fetchall  #   rewrite +#   explicit  #   nokeep  #   noflush  #   nofetchall  #   norewrite +#   noexplicit  #   port  #  # Legal protocol identifiers are  | 
