summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTony Finch <dot@dot.at>2005-09-19 09:41:37 +0000
committerTony Finch <dot@dot.at>2005-09-19 09:41:37 +0000
commita7fdad5bca2c6495f3181e29835eeef7670a567b (patch)
treeeb7d0ea9302caa4b24f1c9bc9e85617a831da71d /src
parente7726cbf334d1782435662c2d209ad82ec602c5c (diff)
Apply the fix for widen_domains to qualify_single and search_parents
which are the other dnslookup options that can cause header rewrites.
Diffstat (limited to 'src')
-rw-r--r--src/src/routers/dnslookup.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/src/routers/dnslookup.c b/src/src/routers/dnslookup.c
index aced23747..9a9fba15a 100644
--- a/src/src/routers/dnslookup.c
+++ b/src/src/routers/dnslookup.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/routers/dnslookup.c,v 1.6 2005/09/15 16:02:07 fanf2 Exp $ */
+/* $Cambridge: exim/src/src/routers/dnslookup.c,v 1.7 2005/09/19 09:41:37 fanf2 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -253,10 +253,14 @@ for (;;)
/* Unfortunately, we cannot set the mx_only option in advance, because the
DNS lookup may extend an unqualified name. Therefore, we must do the test
- subsequently. */
+ subsequently. We use the same logic as that for widen_domains above to avoid
+ requesting a header rewrite that cannot work. */
- if (ob->qualify_single) flags |= HOST_FIND_QUALIFY_SINGLE;
- if (ob->search_parents) flags |= HOST_FIND_SEARCH_PARENTS;
+ if (verify != v_sender || !ob->rewrite_headers || addr->parent != NULL)
+ {
+ if (ob->qualify_single) flags |= HOST_FIND_QUALIFY_SINGLE;
+ if (ob->search_parents) flags |= HOST_FIND_SEARCH_PARENTS;
+ }
rc = host_find_bydns(&h, rblock->ignore_target_hosts, flags, srv_service,
ob->srv_fail_domains, ob->mx_fail_domains, &fully_qualified_name, &removed);