From 3e1dcfa582687258c8ef93604bd6882e9b3e40c6 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 5 Jun 2001 06:57:59 +0000 Subject: Tracepolls switch implemented. svn path=/trunk/; revision=3337 --- NEWS | 1 + conf.c | 1 + driver.c | 13 ++++++++----- fetchmail-features.html | 7 +++++-- fetchmail.c | 6 ++++++ fetchmail.h | 1 + fetchmail.man | 26 ++++++++++++++++++++++++++ fetchmailconf | 9 +++++++-- options.c | 9 +++++++++ rcfile_l.l | 1 + rcfile_y.y | 3 +++ 11 files changed, 68 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 0f3d247d..1a081148 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ (The `lines' figures total .c, .h, .l, and .y files under version control.) * Reject candidate headers for the MAIL FROM address that have \n in them. +* Add capability to insert poll trace data in the Received line. fetchmail-5.8.5 (Tue May 29 20:01:39 EDT 2001), 20650 lines: diff --git a/conf.c b/conf.c index 2daa8225..4086ffec 100644 --- a/conf.c +++ b/conf.c @@ -384,6 +384,7 @@ void dump_config(struct runctl *runp, struct query *querylist) listdump("smtphunt", ctl->smtphunt); stringdump("smtpaddress", ctl->smtpaddress); stringdump("smtpname", ctl->smtpname); + booldump("tracepolls", ctl->tracepolls); indent('\0'); fprintf(stdout, "'antispam':'"); diff --git a/driver.c b/driver.c index d05c8ef3..19c2f411 100644 --- a/driver.c +++ b/driver.c @@ -1067,15 +1067,18 @@ static int readheaders(int sock, /* * This header is technically invalid under RFC822. * POP3, IMAP, etc. are not legal mail-parameter values. - * - * We used to include ctl->remotename in this log line, - * but this can be secure information that would be bad - * to reveal. */ - sprintf(buf, "\tby %s with %s (fetchmail-%s)\r\n", + sprintf(buf, "\tby %s with %s (fetchmail-%s)", fetchmailhost, protocol->name, VERSION); + if (ctl->tracepolls) + { + sprintf(buf + strlen(buf), " polling %s account %s", + ctl->server.pollname, + ctl->remotename); + } + strcat(buf, "\r\n"); n = stuffline(ctl, buf); if (n != -1) { diff --git a/fetchmail-features.html b/fetchmail-features.html index f75a0530..75c07875 100644 --- a/fetchmail-features.html +++ b/fetchmail-features.html @@ -10,7 +10,7 @@
Back to Fetchmail Home Page To Site Map -$Date: 2001/05/14 16:13:22 $ +$Date: 2001/06/05 06:57:54 $

@@ -18,6 +18,9 @@

Since 5.0: