diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-07-19 14:51:00 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-07-19 14:51:00 +0000 |
commit | 73799e479c5ff0f5788212cc06c35792c2da3149 (patch) | |
tree | bde01323a8d059a82c72b290b336ba12b3bad80b | |
parent | c2398336ad81e3d7e9ff6ce76528bcc934367e40 (diff) | |
download | fetchmail-73799e479c5ff0f5788212cc06c35792c2da3149.tar.gz fetchmail-73799e479c5ff0f5788212cc06c35792c2da3149.tar.bz2 fetchmail-73799e479c5ff0f5788212cc06c35792c2da3149.zip |
Freeze bug fixes befoire adding more features.
svn path=/trunk/; revision=38
-rw-r--r-- | NEWS | 29 | ||||
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | fetchmail.c | 2 | ||||
-rw-r--r-- | fetchmail.h | 3 | ||||
-rw-r--r-- | fetchmail.man | 12 | ||||
-rw-r--r-- | options.c | 11 | ||||
-rw-r--r-- | pop3.c | 12 | ||||
-rw-r--r-- | rcfile_l.l | 14 | ||||
-rw-r--r-- | rcfile_y.y | 7 |
9 files changed, 71 insertions, 23 deletions
@@ -1,10 +1,32 @@ NEWS +To-do list: + +I want a --logfile option that redirects the daemon-mode output to a +given file, but the code (in daemon.c near 200) unaccountably doesn't +work (so I haven't documented it yet). + +Option to enable EMACS-like user folder versioning on each run. + +-p option to come back? + +S/key for secure challenge-response. + +Implement IMAP support. + +3.02: + +* Correct buggy processing of nokeep/noflush/fetchall. + +* Fix buggy -mda option processing. + +* Added -N/--norewrite option. + 3.01: * Fixed a lexical analyzer bug in quoted-string processing. -* Fixed a bug in dump_options that cauded username to be displayed incorrectly. +* Fixed a bug in dump_options that caused username to be displayed incorrectly. * The lock assertion code was in the wrong place relative to the daemonize() call. @@ -100,11 +122,6 @@ MISCELLANEOUS BUG FIXES * I've fixed the flaky parser error messages. They turned out to be due to a misdeclaration of yytext. -There's only one feature I haven't been able to add successfully. I -want a --logfile option that redirects the daemon-mode output to a -given file, but the code (in daemon.c near 200) unaccountably doesn't -work (so I haven't documented it yet). - These are Carl Harris's change notes from prevuious releases: 3.0b5 @@ -14,14 +14,14 @@ Features of POP include: * Easy configuration via command line or free-format .poprc file. - * Daemon mode -- popmail can be run in background to poll + * Daemon mode -- popmail can be run in background to poll one or more hosts at a specified interval. * Delivery via either file-append with mandatory locking or an MDA you specify. * From:, To:, Cc:, and Reply-To: headers are rewritten so that - usernames relative to the popclient host become fiully-qualified + usernames relative to the popclient host become fully-qualified Internet addresses. This enables replies to work correctly. There is a man page at popclient.man. A sample rc file is at sample.poprc. diff --git a/fetchmail.c b/fetchmail.c index 68b6600a..e8aae828 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -404,7 +404,7 @@ struct hostrec *queryctl; exit(1); } - execv(queryctl->mda,mda_argv); + execv(queryctl->mda, mda_argv+1); /* if we got here, an error occurred */ perror("popclient: openmailpipe: exec"); diff --git a/fetchmail.h b/fetchmail.h index b9b1cdcf..3eaa1df9 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -21,7 +21,7 @@ #define PASSWORDLEN MAX_PASSWORD_LENGTH #define FOLDERLEN 256 /* max folder name length */ #define DIGESTLEN 33 /* length of MD5 digest */ -#define MDALEN 33 /* length of delivery agent command */ +#define MDALEN 256 /* length of delivery agent command */ /* exit code values */ #define PS_SUCCESS 0 /* successful receipt of messages */ @@ -57,6 +57,7 @@ struct hostrec { int protocol; int fetchall; int flush; + int rewrite; /* dependent on the above members */ int output; diff --git a/fetchmail.man b/fetchmail.man index cdcb2246..35fc9e36 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -168,6 +168,16 @@ and the mailserver are echoed to stderr. Specifying causes normal progress/status messages which would be redundant or meaningless to be modified or omitted. .TP +.B \-N, --norewrite +Normally, +.I popclient +edits RFC-822 address headers (To, From, Cc, Bcc, and Reply-To) in +fetched mail so that any mail IDs local to the host are expanded to +full addresses (@ and the POP host name are appended). This enables +replies on the client to get addressed correctly (otherwise your +mailer might think they should be addressed to local users on the +client machine). This option disables the rewrite. +.TP .B \-V, --version Displays the version information for your copy of .I popclient. @@ -369,9 +379,11 @@ Legal keywords are: keep flush fetchall + rewrite nokeep noflush nofetchall + norewrite .PP Legal protocol identifiers are @@ -39,9 +39,10 @@ #define LA_MDA 16 #define LA_LOGFILE 17 #define LA_QUIT 18 -#define LA_YYDEBUG 19 +#define LA_NOREWRITE 19 +#define LA_YYDEBUG 20 -static char *shortoptions = "23VaKkvscl:Fd:f:u:r:o:m:"; +static char *shortoptions = "23VaKkvscl:Fd:f:u:r:o:m:L:qN"; static struct option longoptions[] = { {"version", no_argument, (int *) 0, LA_VERSION }, {"all", no_argument, (int *) 0, LA_ALL }, @@ -63,6 +64,7 @@ static struct option longoptions[] = { {"mda", required_argument, (int *) 0, LA_MDA }, {"logfile", required_argument, (int *) 0, LA_LOGFILE }, {"quit", no_argument, (int *) 0, LA_QUIT }, + {"norewrite", no_argument, (int *) 0, LA_NOREWRITE }, {"yydebug", no_argument, (int *) 0, LA_YYDEBUG }, {(char *) 0, no_argument, (int *) 0, 0 } }; @@ -218,6 +220,10 @@ struct hostrec *queryctl; case LA_QUIT: quitmode = 1; break; + case 'N': + case LA_NOREWRITE: + queryctl->rewrite = 0; + break; case LA_YYDEBUG: yydebug = 1; break; @@ -297,6 +303,7 @@ struct hostrec *queryctl; #else queryctl->keep = 0; #endif + queryctl->rewrite = 1; strcpy(queryctl->localname,pw->pw_name); strcpy(queryctl->remotename,pw->pw_name); @@ -40,7 +40,7 @@ int POP3_sendSTAT (int *msgcount, int socket); int POP3_sendRETR (int msgnum, int socket); int POP3_sendDELE (int msgnum, int socket); int POP3_sendLAST (int *last, int socket); -int POP3_readmsg (int socket, int mboxfd, char *host, int topipe); +int POP3_readmsg (int socket, int mboxfd, char *host, int topipe, int rewrite); int POP3_BuildDigest (char *buf, struct hostrec *options); #endif @@ -165,7 +165,10 @@ struct hostrec *queryctl; goto cleanUp; if (number >= first || queryctl->fetchall) - ok = POP3_readmsg(socket,mboxfd,queryctl->servername,queryctl->output == TO_MDA); + ok = POP3_readmsg(socket,mboxfd, + queryctl->servername, + queryctl->output == TO_MDA, + queryctl->rewrite); else ok = 0; if (ok != 0) @@ -537,11 +540,12 @@ int socket; globals: reads outlevel. *********************************************************************/ -int POP3_readmsg (socket,mboxfd,pophost,topipe) +int POP3_readmsg (socket,mboxfd,pophost,topipe,rewrite) int socket; int mboxfd; char *pophost; int topipe; +int rewrite; { char buf [MSGBUFSIZE]; char *bufp; @@ -610,7 +614,7 @@ int topipe; /* * Edit some headers so that replies will work properly. */ - if (inheaders) + if (inheaders && rewrite) reply_hack(bufp, pophost); /* write this line to the file */ @@ -32,12 +32,14 @@ pass(word)? { return KW_PASSWORD; } remote(folder)? { return KW_REMOTEFOLDER; } local(folder)? { return KW_LOCALFOLDER; } mda { return KW_MDA; } -keep { yylval.flag = 1; return KW_KEEP; } -flush { yylval.flag = 1; return KW_FLUSH; } -fetchall { yylval.flag = 1; return KW_FETCHALL; } -nokeep { yylval.flag = -1; return KW_KEEP; } -noflush { yylval.flag = -1; return KW_FLUSH; } -nofetchall { yylval.flag = -1; return KW_FETCHALL; } +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; } +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; } (pop2)|(POP2) { yylval.proto = P_POP2; return PROTO_POP2; } (pop3)|(POP3) { yylval.proto = P_POP3; return PROTO_POP3; } @@ -33,9 +33,13 @@ int yydebug; /* in case we didn't generate with -- debug */ %token KW_REMOTEFOLDER KW_LOCALFOLDER KW_MDA KW_EOL KW_DEFAULTS %token <proto> PROTO_POP2 PROTO_POP3 PROTO_IMAP PROTO_APOP PROTO_RPOP %token <sval> PARAM_STRING -%token <flag> KW_KEEP KW_FLUSH KW_FETCHALL +%token <flag> KW_KEEP KW_FLUSH KW_FETCHALL KW_REWRITE %type <proto> proto; +/* these are actually used by the lexer */ +%token TRUE 1 +%token FALSE 0 + %% rcfile: rcline @@ -68,6 +72,7 @@ serv_option_clause: | KW_KEEP {prc_setkeep($1);} | KW_FLUSH {prc_setflush($1);} | KW_FETCHALL {prc_setfetchall($1);} + | KW_REWRITE {prc_setrewrite($1);} ; proto: PROTO_POP2 |