Previously the only cases considered were a regular expression, or an
empty pattern.
(b) Fixed typo in the FAQ ("prefix" should have been "local_part_prefix").
-## $Cambridge: exim/doc/doc-src/FAQ.src,v 1.4 2004/11/12 14:42:04 nm4 Exp $
+## $Cambridge: exim/doc/doc-src/FAQ.src,v 1.5 2004/11/12 15:03:40 ph10 Exp $
##
## This file is processed by Perl scripts to produce an ASCII and an HTML
## version. Lines starting with ## are omitted. The markup used with paragraphs
##
## This file is processed by Perl scripts to produce an ASCII and an HTML
## version. Lines starting with ## are omitted. The markup used with paragraphs
driver = accept
check_local_user
transport = local_delivery
driver = accept
check_local_user
transport = local_delivery
+ local_part_prefix = real-
before the \%redirect%\ router that handles \(.forward)\ files. This will
do an ordinary local delivery without \(.forward)\ processing, if the
before the \%redirect%\ router that handles \(.forward)\ files. This will
do an ordinary local delivery without \(.forward)\ processing, if the
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.26 2004/11/12 12:01:52 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.27 2004/11/12 15:03:40 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
Change log file for Exim from version 4.21
-------------------------------------------
28. Installed the latest version of exipick from John Jetmore.
28. Installed the latest version of exipick from John Jetmore.
+29. In an address list, if the pattern was not a regular expression, an empty
+ subject address (from a bounce message) matched only if the pattern was an
+ empty string. Non-empty patterns were not even tested. This was the wrong
+ because it is perfectly reasonable to use an empty address as part of a
+ database query. An empty address is now tested by patterns that are
+ lookups. However, all the other forms of pattern expect the subject to
+ contain a local part and a domain, and therefore, for them, an empty
+ address still always fails if the pattern is not itself empty.
+
Exim version 4.43
-----------------
Exim version 4.43
-----------------
-$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.4 2004/11/10 14:15:20 ph10 Exp $
+$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.5 2004/11/12 15:03:40 ph10 Exp $
Vivek Dasmohapatra Suggested patch for CRL support
Andrew Doran Patch for NetBSD configuration files
Patch for ifreq alignment and size problems
Vivek Dasmohapatra Suggested patch for CRL support
Andrew Doran Patch for NetBSD configuration files
Patch for ifreq alignment and size problems
-Michael Deutschman Suggested patch for treating bind() failure like connect()
+Michael Deutschmann Suggested patch for treating bind() failure like connect()
Patch for $sender_data and $recipient_data
Patch for $sender_data and $recipient_data
+ Suggested patch for null address match lookup bug
Oliver Eikemeier Patch to skip Received: if expansion is empty
Patch for "eqi"
Nico Erfurth Fix for bug in ${readfile}
Oliver Eikemeier Patch to skip Received: if expansion is empty
Patch for "eqi"
Nico Erfurth Fix for bug in ${readfile}
-/* $Cambridge: exim/src/src/match.c,v 1.1 2004/10/07 10:39:01 ph10 Exp $ */
+/* $Cambridge: exim/src/src/match.c,v 1.2 2004/11/12 15:03:40 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/*************************************************
* Exim - an Internet mail transport agent *
DEBUG(D_lists) debug_printf("address match: subject=%s pattern=%s\n",
subject, pattern);
DEBUG(D_lists) debug_printf("address match: subject=%s pattern=%s\n",
subject, pattern);
-/* Handle a regular expression, which must match the entire incoming address. */
+/* Handle a regular expression, which must match the entire incoming address.
+This may be the empty address. */
if (*pattern == '^')
return match_check_string(subject, pattern, cb->expand_setup, TRUE,
cb->caseless, FALSE, NULL);
if (*pattern == '^')
return match_check_string(subject, pattern, cb->expand_setup, TRUE,
cb->caseless, FALSE, NULL);
-/* If the subject is the empty string, the only pattern it can match (other
-than a regular expression) is the empty pattern. */
-
-if (*subject == 0) return (*pattern == 0)? OK : FAIL;
-
-/* Find the domain in the subject */
-
-sdomain = Ustrrchr(subject, '@');
-
-/* Handle the case of a pattern that is just a lookup. Skip over possible
-lookup names (letters, digits, hyphens). Skip over a possible * or *@ at
-the end. Then we must have a semicolon for it to be a lookup. */
+/* Handle a pattern that is just a lookup. Skip over possible lookup names
+(letters, digits, hyphens). Skip over a possible * or *@ at the end. Then we
+must have a semicolon for it to be a lookup. */
for (s = pattern; isalnum(*s) || *s == '-'; s++);
if (*s == '*') s++;
if (*s == '@') s++;
for (s = pattern; isalnum(*s) || *s == '-'; s++);
if (*s == '*') s++;
if (*s == '@') s++;
-/* If it is a straight lookup, do a lookup for the whole address. Partial
-matching doesn't make sense here, so we ignore it, but write a panic log entry.
-However, *@ matching will be honoured. */
+/* If it is a straight lookup, do a lookup for the whole address. This may be
+the empty address. Partial matching doesn't make sense here, so we ignore it,
+but write a panic log entry. However, *@ matching will be honoured. */
+/* For the remaining cases, an empty subject matches only an empty pattern,
+because other patterns expect to have a local part and a domain to match
+against. */
+
+if (*subject == 0) return (*pattern == 0)? OK : FAIL;
+
+/* Find the subject's domain */
+
+sdomain = Ustrrchr(subject, '@');
+
/* If the pattern starts with "@@" we have a split lookup, where the domain is
looked up to obtain a list of local parts. If the subject's local part is just
"*" (called from retry) the match always fails. */
/* If the pattern starts with "@@" we have a split lookup, where the domain is
looked up to obtain a list of local parts. If the subject's local part is just
"*" (called from retry) the match always fails. */