X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/8e669ac162fe3b1040297f1d021de10778dce9d9..13b685f963e9313409f8350f718bac411829a5e7:/src/src/match.c diff --git a/src/src/match.c b/src/src/match.c index 106cb6a35..100e4c0cb 100644 --- a/src/src/match.c +++ b/src/src/match.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/match.c,v 1.5 2005/02/17 11:58:26 ph10 Exp $ */ +/* $Cambridge: exim/src/src/match.c,v 1.8 2005/08/01 13:20:28 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -266,12 +266,20 @@ up user@domain for sender rejection). There's a flag to disable it. */ if (!cb->use_partial) partial = -1; -/* Set the parameters for the two different kinds of lookup. */ +/* Set the parameters for the three different kinds of lookup. */ keyquery = semicolon + 1; while (isspace(*keyquery)) keyquery++; -if (!mac_islookup(search_type, lookup_querystyle)) +if (mac_islookup(search_type, lookup_absfilequery)) + { + filename = keyquery; + while (*keyquery != 0 && !isspace(*keyquery)) keyquery++; + filename = string_copyn(filename, keyquery - filename); + while (isspace(*keyquery)) keyquery++; + } + +else if (!mac_islookup(search_type, lookup_querystyle)) { filename = keyquery; keyquery = s; @@ -697,8 +705,9 @@ while ((sss = string_nextinlist(&list, &sep, buffer, sizeof(buffer))) != NULL) case DEFER: goto DEFER_RETURN; - /* The ERROR return occurs only when checking hosts, when either a - forward or reverse lookup has failed. The error string gives details of + /* The ERROR return occurs when checking hosts, when either a forward + or reverse lookup has failed. It can also occur in a match_ip list if a + non-IP address item is encountered. The error string gives details of which it was. */ case ERROR: @@ -782,13 +791,13 @@ while ((sss = string_nextinlist(&list, &sep, buffer, sizeof(buffer))) != NULL) switch ((func)(arg, ss, valueptr, &error)) { case OK: - fclose(f); + (void)fclose(f); HDEBUG(D_lists) debug_printf("%s %s (matched \"%s\" in %s)\n", ot, (yield == OK)? "yes" : "no", sss, filename); return file_yield; case DEFER: - fclose(f); + (void)fclose(f); goto DEFER_RETURN; case ERROR: /* host name lookup failed - this can only */ @@ -801,7 +810,7 @@ while ((sss = string_nextinlist(&list, &sep, buffer, sizeof(buffer))) != NULL) { HDEBUG(D_lists) debug_printf("%s %s (%s)\n", ot, include_unknown? "yes":"no", error); - fclose(f); + (void)fclose(f); if (!include_unknown) return FAIL; log_write(0, LOG_MAIN, "%s: accepted by +include_unknown", error); return OK; @@ -813,7 +822,7 @@ while ((sss = string_nextinlist(&list, &sep, buffer, sizeof(buffer))) != NULL) for the file, in case this is the last item in the list. */ yield = file_yield; - fclose(f); + (void)fclose(f); } } /* Loop for the next item on the top-level list */