diff options
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | env.c | 1 | ||||
-rw-r--r-- | fetchmail.c | 39 | ||||
-rw-r--r-- | interface.c | 4 | ||||
-rw-r--r-- | options.c | 6 | ||||
-rw-r--r-- | rcfile_l.l | 3 |
6 files changed, 38 insertions, 22 deletions
@@ -13,6 +13,10 @@ fetchmail-5.0.7 (): * RPA support works again. * Added debian_rc startup/shutdown script to contrib/. +* Yet another monitor option fix. +* Variouas small option-processing fixes. +* Teach fetchmailconf about HP OpenMail. +* SunOS compilation fixes. There are 263 people on fetchmail-friends and 421 on fetchmail-announce. @@ -21,7 +25,8 @@ fetchmail-5.0.6 (Mon Aug 2 14:04:23 EDT 1999): * Russion internationalization support (but I couldn't read the contributor name in the headers!) * Update of the French internationalization support by Guy Brand. -* Lexer fix for the `nokeep' problem by Robert de Bath. +* Lexer fix for the `nokeep' problem by Robert de Bath (thanks + to David "Hi! I'm an obnoxious twerp" Ashley for stimulating this). * Lexer states added to tell the lexer to return a string after a `username' or `password' keyword, courtesy of Brian Boutel. * Interface option fix from Bill Currie. @@ -16,7 +16,6 @@ #endif #include <pwd.h> #include <string.h> -#include <ctype.h> #ifdef HAVE_GETHOSTBYNAME #include <netdb.h> #endif /* HAVE_GETHOSTBYNAME */ diff --git a/fetchmail.c b/fetchmail.c index de0977f3..ee790597 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -16,6 +16,7 @@ #include <fcntl.h> #include <string.h> #include <signal.h> +#include <getopt.h> #if defined(HAVE_SYSLOG) #include <syslog.h> #endif @@ -32,7 +33,7 @@ #endif /* HAVE_SETRLIMIT */ #ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> -#endif +#endif /* HAVE_SYS_WAIT_H */ #ifdef HAVE_GETHOSTBYNAME #include <netdb.h> @@ -272,11 +273,14 @@ int main(int argc, char **argv) } #endif /* HAVE_SETRLIMIT */ +#define NETRC_FILE ".netrc" /* parse the ~/.netrc file (if present) for future password lookups. */ - xalloca(netrc_file, char *, strlen (home) + 8); + xalloca(netrc_file, char *, strlen (home) + strlen(NETRC_FILE) + 2); strcpy (netrc_file, home); - strcat (netrc_file, "/.netrc"); + strcat (netrc_file, "/"); + strcat (netrc_file, NETRC_FILE); netrc_list = parse_netrc(netrc_file); +#undef NETRC_FILE /* pick up passwords where we can */ for (ctl = querylist; ctl; ctl = ctl->next) @@ -1391,19 +1395,26 @@ static void dump_params (struct runctl *runp, * Don't poll for password when there is one or when using the ETRN * or IMAP-GSS protocol */ - if (!ctl->password && (ctl->server.protocol != P_ETRN) + /* ETRN, IMAP_GSS, and IMAP_K4 do not need a password, so skip this */ + if ( (ctl->server.protocol != P_ETRN) #ifdef GSSAPI - && (ctl->server.protocol != P_IMAP_GSS) + && (ctl->server.protocol != P_IMAP_GSS) #endif /* GSSAPI */ - && ctl->server.protocol != P_IMAP_K4) - printf(_(" Password will be prompted for.\n")); - else if (outlevel >= O_VERBOSE) - if (ctl->server.protocol == P_APOP) - printf(_(" APOP secret = \"%s\".\n"), visbuf(ctl->password)); - else if (ctl->server.protocol == P_RPOP) - printf(_(" RPOP id = \"%s\".\n"), visbuf(ctl->password)); - else - printf(_(" Password = \"%s\".\n"), visbuf(ctl->password)); + && (ctl->server.protocol != P_IMAP_K4) ) { + if (!ctl->password) + printf(_(" Password will be prompted for.\n")); + else if (outlevel >= O_VERBOSE) + if (ctl->server.protocol == P_APOP) + printf(_(" APOP secret = \"%s\".\n"), + visbuf(ctl->password)); + else if (ctl->server.protocol == P_RPOP) + printf(_(" RPOP id = \"%s\".\n"), + visbuf(ctl->password)); + else + printf(_(" Password = \"%s\".\n"), + visbuf(ctl->password)); + } + if (ctl->server.protocol == P_POP3 #if INET6 && !strcmp(ctl->server.service, KPOP_PORT) diff --git a/interface.c b/interface.c index a062f5dc..936b5bf9 100644 --- a/interface.c +++ b/interface.c @@ -488,7 +488,7 @@ int interface_approve(struct hostdata *hp) * (c) newpacket count is greater than the old packet count, * and the difference is large. Connection is live. Don't skip. */ - if (diff > 0 && diff <= MONITOR_SLOP) + if (diff >= 0 && diff <= MONITOR_SLOP) { (void) report(stdout, _("skipping poll of %s, %s inactive\n"), @@ -498,7 +498,7 @@ int interface_approve(struct hostdata *hp) } #ifdef ACTIVITY_DEBUG - report(stdout _("activity on %s was %d, is %d"), + report(stdout, _("activity on %s was %d, is %d\n"), hp->monitor, hp->monitor_io, ifinfo.rx_packets + ifinfo.tx_packets); #endif @@ -430,7 +430,7 @@ struct query *ctl; /* option record to be initialized */ break; case 'r': case LA_FOLDER: - xalloca(buf, char *, strlen(optarg)); + xalloca(buf, char *, strlen(optarg) + 1); strcpy(buf, optarg); cp = strtok(buf, ","); do { @@ -440,7 +440,7 @@ struct query *ctl; /* option record to be initialized */ break; case 'S': case LA_SMTPHOST: - xalloca(buf, char *, strlen(optarg)); + xalloca(buf, char *, strlen(optarg) + 1); strcpy(buf, optarg); cp = strtok(buf, ","); do { @@ -455,7 +455,7 @@ struct query *ctl; /* option record to be initialized */ break; case 'Z': case LA_ANTISPAM: - xalloca(buf, char *, strlen(optarg)); + xalloca(buf, char *, strlen(optarg) + 1); strcpy(buf, optarg); cp = strtok(buf, ","); do { @@ -42,6 +42,8 @@ int prc_lineno = 1; return STRING; } +"*" { BEGIN(0); return WILDCARD; } + <NAME>[^=;:, \t\r\n]+ { char buf[MSGBUFSIZE]; @@ -106,7 +108,6 @@ here { return HERE; } there { return THERE; } to { BEGIN(NAME); return TO; } = { BEGIN(NAME); return MAP; } -"*" { BEGIN(0); return WILDCARD; } nobouncemail | nouidl | |