aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2010-02-24 01:54:22 +0100
committerMatthias Andree <matthias.andree@gmx.de>2010-02-24 01:54:22 +0100
commitc1cf83738a260121cf7dcc007af8709d0bc15419 (patch)
tree65b087c9056013f75192a81ce573ebb7014c3321 /fetchmail.c
parent1c10c414e45ccedc8999f7dd95889fce6f6890ff (diff)
downloadfetchmail-c1cf83738a260121cf7dcc007af8709d0bc15419.tar.gz
fetchmail-c1cf83738a260121cf7dcc007af8709d0bc15419.tar.bz2
fetchmail-c1cf83738a260121cf7dcc007af8709d0bc15419.zip
Feature: bad-header {reject|pass}
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fetchmail.c b/fetchmail.c
index cb1bc900..5d02a289 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -944,6 +944,7 @@ static void optmerge(struct query *h2, struct query *h1, int force)
FLAG_MERGE(server.plugin);
FLAG_MERGE(server.plugout);
FLAG_MERGE(server.tracepolls);
+ FLAG_MERGE(server.badheader);
FLAG_MERGE(wildcard);
FLAG_MERGE(remotename);
@@ -1012,6 +1013,7 @@ static int load_params(int argc, char **argv, int optind)
def_opts.server.protocol = P_AUTO;
def_opts.server.timeout = CLIENT_TIMEOUT;
def_opts.server.esmtp_name = user;
+ def_opts.server.badheader = BHREJECT;
def_opts.warnings = WARNING_INTERVAL;
def_opts.remotename = user;
def_opts.listener = SMTP_MODE;
@@ -1949,6 +1951,16 @@ static void dump_params (struct runctl *runp,
else if (outlevel >= O_VERBOSE)
printf(GT_(" No poll trace information will be added to the Received header.\n.\n"));
+ switch (ctl->server.badheader) {
+ case BHREJECT:
+ if (outlevel >= O_VERBOSE)
+ printf(GT_(" Messages with bad headers will be rejected.\n"));
+ break;
+ case BHPASS:
+ printf(GT_(" Messages with bad headers will be passed on.\n"));
+ break;
+ }
+
if (ctl->properties)
printf(GT_(" Pass-through properties \"%s\".\n"),
visbuf(ctl->properties));