Re: [exim] @mx_any trouble with match_domain

Pàgina inicial
Delete this message
Reply to this message
Autor: David Woodhouse
Data:  
A: exim-users
Assumpte: Re: [exim] @mx_any trouble with match_domain
On Thu, 2004-09-09 at 23:47 +0100, David Woodhouse wrote:
> I am confused. One debugging run contains both...
>
> cvs.infradead.org in "@mx_any"? no (end of list)
>     ... and ...
> lowest numbered MX record points to local host: cvs.infradead.org

>
> Now surely it can't be both _not_ in the MX list and also the lowest
> number MX in the list?


The problem seems to be that we set MCL_NOEXPAND when we call
match_isinlist() after encountering a match_domain condition.
The test case fails even if you make a separate domainlist and use
_that_...

domainlist anymx = @mx_any
begin routers

mx:
driver = redirect
domains = +anymx
condition = ${if match_domain{$domain}{+anymx}{yes}}
....

baythorne.infradead.org in "@mx_any"? yes (matched "@mx_any")
baythorne.infradead.org in "+anymx"? yes (matched "+anymx")
checking "condition"
baythorne.infradead.org in "@mx_any"? no (end of list)
baythorne.infradead.org in "+anymx"? no (end of list)

Suggested patch:

--- src/expand.c~    2004-09-07 16:56:10.000000000 +0100
+++ src/expand.c    2004-09-10 10:31:45.658968970 +0100
@@ -1845,12 +1845,12 @@


     case ECOND_MATCH_DOMAIN:   /* Match in a domain list */
     rc = match_isinlist(sub[0], &(sub[1]), 0, &domainlist_anchor, NULL,
-      MCL_DOMAIN + MCL_NOEXPAND, TRUE, NULL);
+      MCL_DOMAIN, TRUE, NULL);
     goto MATCHED_SOMETHING;


     case ECOND_MATCH_LOCAL_PART:
     rc = match_isinlist(sub[0], &(sub[1]), 0, &localpartlist_anchor, NULL,
-      MCL_LOCALPART + MCL_NOEXPAND, TRUE, NULL);
+      MCL_LOCALPART, TRUE, NULL);
     /* Fall through */


     MATCHED_SOMETHING:


--
dwmw2