diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-03-15 11:37:21 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-03-15 11:37:21 +0000 |
commit | 7f45268c9e24a11001679f1e50b1ac77b43e8aa9 (patch) | |
tree | 6359505ac97ba63206e085dfcc5c9368a3d8d846 /src | |
parent | 441b73cf02d8657de2ff8b72cf524e87a408a98e (diff) |
Forbid both "unseen" and "one_time" on redirect routers.
Diffstat (limited to 'src')
-rw-r--r-- | src/src/acl.c | 34 | ||||
-rw-r--r-- | src/src/route.c | 4 | ||||
-rw-r--r-- | src/src/routers/redirect.c | 10 |
3 files changed, 26 insertions, 22 deletions
diff --git a/src/src/acl.c b/src/src/acl.c index 70ce7368c..1d0150d5b 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/acl.c,v 1.23 2005/03/09 14:36:54 tom Exp $ */ +/* $Cambridge: exim/src/src/acl.c,v 1.24 2005/03/15 11:37:21 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -94,12 +94,12 @@ static uschar *conditions[] = { US"acl", US"authenticated", US"demime", #endif #ifdef EXPERIMENTAL_DOMAINKEYS - US"dk_domain_source", - US"dk_policy", - US"dk_sender_domains", - US"dk_sender_local_parts", - US"dk_senders", - US"dk_status", + US"dk_domain_source", + US"dk_policy", + US"dk_sender_domains", + US"dk_sender_local_parts", + US"dk_senders", + US"dk_status", #endif US"dnslists", US"domains", US"encrypted", US"endpass", US"hosts", US"local_parts", US"log_message", US"logwrite", @@ -149,12 +149,12 @@ static uschar cond_expand_at_top[] = { TRUE, /* demime */ #endif #ifdef EXPERIMENTAL_DOMAINKEYS - TRUE, /* dk_domain_source */ - TRUE, /* dk_policy */ - TRUE, /* dk_sender_domains */ + TRUE, /* dk_domain_source */ + TRUE, /* dk_policy */ + TRUE, /* dk_sender_domains */ TRUE, /* dk_sender_local_parts */ - TRUE, /* dk_senders */ - TRUE, /* dk_status */ + TRUE, /* dk_senders */ + TRUE, /* dk_status */ #endif TRUE, /* dnslists */ FALSE, /* domains */ @@ -205,12 +205,12 @@ static uschar cond_modifiers[] = { FALSE, /* demime */ #endif #ifdef EXPERIMENTAL_DOMAINKEYS - FALSE, /* dk_domain_source */ - FALSE, /* dk_policy */ - FALSE, /* dk_sender_domains */ + FALSE, /* dk_domain_source */ + FALSE, /* dk_policy */ + FALSE, /* dk_sender_domains */ FALSE, /* dk_sender_local_parts */ - FALSE, /* dk_senders */ - FALSE, /* dk_status */ + FALSE, /* dk_senders */ + FALSE, /* dk_status */ #endif FALSE, /* dnslists */ FALSE, /* domains */ diff --git a/src/src/route.c b/src/src/route.c index 47d95332e..a80ecb62d 100644 --- a/src/src/route.c +++ b/src/src/route.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/route.c,v 1.4 2005/01/11 15:51:02 ph10 Exp $ */ +/* $Cambridge: exim/src/src/route.c,v 1.5 2005/03/15 11:37:21 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1889,8 +1889,6 @@ yield = exp_bool(addr, r->name, US"unseen", r->unseen, r->expand_unseen, &unseen); if (yield != OK) goto ROUTE_EXIT; - - /* Debugging output recording a successful routing */ HDEBUG(D_route) diff --git a/src/src/routers/redirect.c b/src/src/routers/redirect.c index 90ec9de6a..461fc5d92 100644 --- a/src/src/routers/redirect.c +++ b/src/src/routers/redirect.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/routers/redirect.c,v 1.5 2005/02/17 11:58:27 ph10 Exp $ */ +/* $Cambridge: exim/src/src/routers/redirect.c,v 1.6 2005/03/15 11:37:21 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -185,7 +185,10 @@ if ((ob->file == NULL) == (ob->data == NULL)) "%sone of \"file\" or \"data\" must be specified", rblock->name, (ob->file == NULL)? "" : "only "); -/* Onetime aliases can only be real addresses. Headers can't be manipulated. */ +/* Onetime aliases can only be real addresses. Headers can't be manipulated. +The combination of one_time and unseen is not allowed. We can't check the +expansion of "unseen" here, but we assume that if it is set to anything other +than false, there is likely to be a problem. */ if (ob->one_time) { @@ -194,6 +197,9 @@ if (ob->one_time) log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s router:\n " "\"headers_add\" and \"headers_remove\" are not permitted with " "\"one_time\"", rblock->name); + if (rblock->unseen || rblock->expand_unseen != NULL) + log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s router:\n " + "\"unseen\" may not be used with \"one_time\"", rblock->name); } /* The defaults for check_owner and check_group depend on other settings. The |