-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.439 2006/11/20 14:29:31 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.440 2006/12/04 15:00:19 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
forward lookup of the name timed out, the host name was left in
$sender_host_name, contrary to the specification.
+PH/49 Although default lookup types such as lsearch* or cdb*@ have always been
+ restricted to single-key lookups, Exim was not diagnosing an error if
+ * or *@ was used with a query-style lookup.
+
Exim version 4.63
-----------------
-/* $Cambridge: exim/src/src/search.c,v 1.3 2006/02/07 11:19:00 ph10 Exp $ */
+/* $Cambridge: exim/src/src/search.c,v 1.4 2006/12/04 15:00:20 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
}
/* Check for the individual search type. Only those that are actually in the
-binary are valid. For query-style types, "partial" is an error. */
+binary are valid. For query-style types, "partial" and default types are
+erroneous. */
stype = search_findtype(ss, len);
-if (pv >= 0 && mac_islookup(stype, lookup_querystyle))
+if (stype >= 0 && mac_islookup(stype, lookup_querystyle))
{
- search_error_message = string_sprintf("\"partial\" is not permitted "
- "for lookup type \"%s\"", ss);
- return -1;
+ if (pv >= 0)
+ {
+ search_error_message = string_sprintf("\"partial\" is not permitted "
+ "for lookup type \"%s\"", ss);
+ return -1;
+ }
+ if ((*starflags & (SEARCH_STAR|SEARCH_STARAT)) != 0)
+ {
+ search_error_message = string_sprintf("defaults using \"*\" or \"*@\" are "
+ "not permitted for lookup type \"%s\"", ss);
+ return -1;
+ }
}
-/* All is well; pass back the partial type and return the lookup type. */
-
*ptypeptr = pv;
return stype;
}
# testdb lookups
-
+1
exim -be
match_ip: 12 ${if match_ip{10.11.12.13}{testdb;something}}
match_ip: 13 ${if match_ip{10.11.12.13}{testdb;fail}}
+match_domain: 14 ${if match_domain{a.b.c.d}{testdb*;fail}}
+bad default: ${lookup testdb*{abcd}}
+bad default: ${lookup testdb*@{abcd}}
+bad default: ${lookup testdb*{fail}}
+bad default: ${lookup testdb*@{fail}}
****