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.
* 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
* 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.
exit(1);
}
- execv(queryctl->mda,mda_argv);
+ execv(queryctl->mda, mda_argv+1);
/* if we got here, an error occurred */
perror("popclient: openmailpipe: exec");
#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 */
int protocol;
int fetchall;
int flush;
+ int rewrite;
/* dependent on the above members */
int output;
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.
keep
flush
fetchall
+ rewrite
nokeep
noflush
nofetchall
+ norewrite
.PP
Legal protocol identifiers are
#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 },
{"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 }
};
case LA_QUIT:
quitmode = 1;
break;
+ case 'N':
+ case LA_NOREWRITE:
+ queryctl->rewrite = 0;
+ break;
case LA_YYDEBUG:
yydebug = 1;
break;
#else
queryctl->keep = 0;
#endif
+ queryctl->rewrite = 1;
strcpy(queryctl->localname,pw->pw_name);
strcpy(queryctl->remotename,pw->pw_name);
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
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)
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;
/*
* Edit some headers so that replies will work properly.
*/
- if (inheaders)
+ if (inheaders && rewrite)
reply_hack(bufp, pophost);
/* write this line to the file */
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; }
%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
| KW_KEEP {prc_setkeep($1);}
| KW_FLUSH {prc_setflush($1);}
| KW_FETCHALL {prc_setfetchall($1);}
+ | KW_REWRITE {prc_setrewrite($1);}
;
proto: PROTO_POP2