Re: [Exim] Exim snapshot - lsearch problem

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Nico Erfurth
Ημερομηνία:  
Προς: John Horne
Υ/ο: Exim usersEximUsersList
Αντικείμενο: Re: [Exim] Exim snapshot - lsearch problem
John Horne wrote:
> Hello,
>
> I just installed the exim 4.309 snapshot and I am getting the following
> error messages:
>
> 2004-03-25 11:14:56 H=(mary.csd.plymouth.ac.uk) [141.163.66.134]
> F=<fedora-list-bounces@???> temporarily rejected RCPT
> <john@???>: unknown lookup type
> "partial0-lsearch"
>
>
> As an example of something using this lookup type I have in configure:
>
>   deny    hosts = TABLES/banned/networks : \
>                   ! TABLES/banned/networks-allow : \
>                   ! partial0-lsearch;TABLES/banned/hosts-allow : \
>                   partial0-lsearch;TABLES/banned/hosts : \
>                   cdb;TABLES/banned/spam/reject_hosts.cdb

>
> I can see nothing relevant in the ChangeLog file (the lookup files are
> not that big and none of them have any long lines).
>
> The Makefile has 'LOOKUP_LSEARCH=yes' set.


The follwing patch should fix the problem, it's rather crude, but I
think it's the best solution.
I think the problem was introduced by change 4.31/72. The old code never
worked as it should (IMO) in this case and the code in 4.31 just added
an error-message and defered return.

Nico

diff -uNr exim-snapshot/src/verify.c exim-snapshot.new/src/verify.c
--- exim-snapshot/src/verify.c  2004-03-24 11:35:04.000000000 +0100
+++ exim-snapshot.new/src/verify.c      2004-03-25 14:56:34.000000000 +0100
@@ -1891,7 +1891,11 @@


  if ((semicolon = Ustrchr(ss, ';')) != NULL)
    {
-  int id = search_findtype(ss, semicolon - ss);
+  int partial, affixlen, starflags, id;
+  uschar *affix;
+  *semicolon = '\0';
+  id = search_findtype_partial(ss, &partial, &affix, &affixlen,
+    &starflags);
    if (id < 0)                           /* Unknown lookup type */
      {
      log_write(0, LOG_MAIN|LOG_PANIC, "%s in host list item \"%s\"",
@@ -1899,6 +1903,7 @@
      return DEFER;
      }
    isquery = mac_islookup(id, lookup_querystyle);
+  *semicolon=';';
    }


if (isquery)