From ddcc491837e5b2c1e741eac54dc4058e2f77e398 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Wed, 24 Feb 2010 23:28:44 +0100 Subject: [PATCH] Rename bad-header pass to bad-header accept, ... MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit to resolve an ambiguity found by Frédéric Marchal. --- NEWS | 5 ++--- conf.c | 2 +- fetchmail.c | 2 +- fetchmail.h | 2 +- fetchmail.man | 6 +++--- fetchmailconf.py | 2 +- options.c | 6 +++--- po/de.po | 7 ++++--- rcfile_l.l | 2 +- rcfile_y.y | 4 ++-- transact.c | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/NEWS b/NEWS index a62a9efd..511db278 100644 --- a/NEWS +++ b/NEWS @@ -51,9 +51,8 @@ fetchmail 6.3.15 (not yet released): # FEATURE * Fetchmail now supports a bad-header command line or rcfile option that takes - exactly one argument, pass or reject (default). If set to pass, fetchmail - will pass messages with bad headers on. This has been rejected for a long - time, and the right behaviour was disputed for too long. + exactly one argument, accept or reject (default). This specifies how messages + with bad headers retrieved from the current server are to be treated. # BUG FIXES * In the rcfile, recognize "local" as abbreviation for "localdomains", as diff --git a/conf.c b/conf.c index 5b5d8779..57581381 100644 --- a/conf.c +++ b/conf.c @@ -317,7 +317,7 @@ void dump_config(struct runctl *runp, struct query *querylist) /* this is a hack - we map this to a boolean option for * fetchmailconf purposes */ case BHREJECT: puts("'badheader': FALSE,"); break; - case BHPASS: puts("'badheader': TRUE,"); break; + case BHACCEPT: puts("'badheader': TRUE,"); break; } indent(0); diff --git a/fetchmail.c b/fetchmail.c index b865d092..43c1e98c 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -1956,7 +1956,7 @@ static void dump_params (struct runctl *runp, if (outlevel >= O_VERBOSE) printf(GT_(" Messages with bad headers will be rejected.\n")); break; - case BHPASS: + case BHACCEPT: printf(GT_(" Messages with bad headers will be passed on.\n")); break; } diff --git a/fetchmail.h b/fetchmail.h index 88f7dd33..b43999f9 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -245,7 +245,7 @@ struct method /* describe methods for protocol state machine */ flag retry; /* can getrange poll for new messages? */ }; -enum badheader { BHREJECT = 0, BHPASS }; +enum badheader { BHREJECT = 0, BHACCEPT }; struct hostdata /* shared among all user connections to given server */ { diff --git a/fetchmail.man b/fetchmail.man index 30d46971..636e8b4b 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -700,12 +700,12 @@ reconstruction of MAIL FROM and RCPT TO lines is not guaranteed correct; the caveats discussed under THE USE AND ABUSE OF MULTIDROP MAILBOXES below apply. .TP -.B \-\-bad\-header {reject|pass} +.B \-\-bad\-header {reject|accept} (Keyword: bad\-header; since v6.3.15) .br Specify how fetchmail is supposed to treat messages with bad headers, i. e. headers with bad syntax. Traditionally, fetchmail has rejected such -messages, but some distributors modified fetchmail to pass them. You can now +messages, but some distributors modified fetchmail to accept them. You can now configure fetchmail's behaviour per server. .SS Resource Limit Control Options @@ -1759,7 +1759,7 @@ esmtppassword \& \& T{ Set password for RFC2554 authentication to the ESMTP server. T} bad-header \& \& T{ -How to treat messages with a bad header. Can be reject (default) or pass. +How to treat messages with a bad header. Can be reject (default) or accept. T} .TE diff --git a/fetchmailconf.py b/fetchmailconf.py index 4aae48f8..9bfdda0d 100755 --- a/fetchmailconf.py +++ b/fetchmailconf.py @@ -200,7 +200,7 @@ class Server: if folded: res = res + "\n" if self.badheader: - res = res + "bad-header pass " + res = res + "bad-header accept " if res[-1] == " ": res = res[0:-1] diff --git a/options.c b/options.c index 066a8ab0..0617bdb0 100644 --- a/options.c +++ b/options.c @@ -313,8 +313,8 @@ int parsecmdline (int argc /** argument count */, run.softbounce = TRUE; break; case LA_BADHEADER: - if (strcasecmp(optarg,"pass") == 0) { - ctl->server.badheader = BHPASS; + if (strcasecmp(optarg,"accept") == 0) { + ctl->server.badheader = BHACCEPT; } else if (strcasecmp(optarg,"reject") == 0) { ctl->server.badheader = BHREJECT; } else { @@ -648,7 +648,7 @@ int parsecmdline (int argc /** argument count */, #endif P(GT_(" --plugin specify external command to open connection\n")); P(GT_(" --plugout specify external command to open smtp connection\n")); - P(GT_(" --bad-header {reject|pass}\n" + P(GT_(" --bad-header {reject|accept}\n" " specify policy for handling messages with bad headers\n")); P(GT_(" -p, --protocol specify retrieval protocol (see man page)\n")); diff --git a/po/de.po b/po/de.po index 2bf906a4..e32bac77 100644 --- a/po/de.po +++ b/po/de.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: fetchmail 6.3.15-beta1\n" "Report-Msgid-Bugs-To: fetchmail-devel@lists.berlios.de\n" -"POT-Creation-Date: 2010-02-24 01:55+0100\n" +"POT-Creation-Date: 2010-02-24 23:25+0100\n" "PO-Revision-Date: 2010-02-24 01:58+0100\n" "Last-Translator: Matthias Andree \n" "Language-Team: Deutsch \n" @@ -2230,11 +2230,12 @@ msgid " --plugout specify external command to open smtp connection\n" msgstr " --plugout externes Kommando zum Öffnen der SMTP-Verbindung\n" #: options.c:651 +#, fuzzy msgid "" -" --bad-header {reject|pass}\n" +" --bad-header {reject|accept}\n" " specify policy for handling messages with bad headers\n" msgstr "" -" --bad-header {reject|pass}\n" +" --bad-header {reject|accept}\n" " Umgang mit Nachrichten mit defekten Headern\n" #: options.c:654 diff --git a/rcfile_l.l b/rcfile_l.l index 146219a7..9a1fe637 100644 --- a/rcfile_l.l +++ b/rcfile_l.l @@ -114,7 +114,7 @@ principal { return PRINCIPAL; } esmtpname { return ESMTPNAME; } esmtppassword { return ESMTPPASSWORD; } bad-header { return BADHEADER; } -pass { return PASS; } +accept { return ACCEPT; } reject { return REJECT_; } user(name)? {SETSTATE(NAME); return USERNAME; } diff --git a/rcfile_y.y b/rcfile_y.y index b5765d77..c49ec5f3 100644 --- a/rcfile_y.y +++ b/rcfile_y.y @@ -70,7 +70,7 @@ extern char * yytext; %token BATCHLIMIT FETCHLIMIT FETCHSIZELIMIT FASTUIDL EXPUNGE PROPERTIES %token SET LOGFILE DAEMON SYSLOG IDFILE PIDFILE INVISIBLE POSTMASTER BOUNCEMAIL %token SPAMBOUNCE SOFTBOUNCE SHOWDOTS -%token BADHEADER PASS REJECT_ +%token BADHEADER ACCEPT REJECT_ %token PROTO AUTHTYPE %token STRING %token NUMBER @@ -232,7 +232,7 @@ serv_option : AKA alias_list | NO ENVELOPE {current.server.envelope = STRING_DISABLED;} | TRACEPOLLS {current.server.tracepolls = FLAG_TRUE;} | NO TRACEPOLLS {current.server.tracepolls = FLAG_FALSE;} - | BADHEADER PASS {current.server.badheader = BHPASS;} + | BADHEADER ACCEPT {current.server.badheader = BHACCEPT;} | BADHEADER REJECT_ {current.server.badheader = BHREJECT;} ; diff --git a/transact.c b/transact.c index 9d151607..857d7a35 100644 --- a/transact.c +++ b/transact.c @@ -584,7 +584,7 @@ eoh: * MacGregor) */ if (!refuse_mail - && !ctl->server.badheader == BHPASS + && !ctl->server.badheader == BHACCEPT && !isspace((unsigned char)line[0]) && !strchr(line, ':')) { -- 2.43.2