[exim-dev] [Bug 1153] unknown lookup type

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Arkadiusz Miskiewicz
Data:  
Para: exim-dev
Assunto: [exim-dev] [Bug 1153] unknown lookup type
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1153




--- Comment #10 from Arkadiusz Miskiewicz <arekm@???> 2011-09-24 12:27:51 ---
(In reply to comment #9)
> You keep censoring the samples you provide, which makes it hard to examine
> what's happening.


Sorry about that, can supply raw samples via private/irc/jabber.

> You also have something weird happening, because:
> To: Undisclosed-Recipient:;
> is valid and should not have been treated as a left-hand-side and then
> qualified. How did that address come to exist?


The two warning acl from last my comment were used in acl_smtp_data, so this To
comes from some remote client (it's MX server).

> Question 1: did you built Exim yourself? If so, why are you using dynamically
> loaded lookups? They slow things down and add complexity to the upgrade
> process. They're intended for vendors who distribute packages to others, who
> might not have all of the dependencies installed. Those packages should take
> care of ensuring that a lookup module is never out of sync with the main Exim
> binary, to avoid weird failure modes.


Yes, I use dynamic modules but I always build my own rpm package first, so
nothing is out of sync here. Old ones were uninstalled after upgrading my own
rpm exim package (This exim is used in pld-linux.org distro here).

> On a hunch, I added to "domainlist local_domains" the item: ;fred
>
>   $ exim -C /etc/exim/test.conf -bt foobar
>   LOG: MAIN PANIC DIE
>     unknown lookup type ""
>   $ exim -C /etc/exim/test.conf -be 
>   > ${if match_domain{example.com}{+local_domains}}
>   2011-09-24 10:11:08 [81089] unknown lookup type ""

>
> Hrm. You had:
>
> "Undisclosed-Recipient:;"@???


Note that here the only censored thing is "xxx" domain.

> So let's define:
> addresslist foo = Undisclosed-Recipient:;@mailin-ng2.xxx
> then:
> $ exim -C /etc/exim/test.conf -be
> > ${if match_address{snert@???}{+foo}}
> 2011-09-24 10:16:34 [81162] unknown lookup type ""
>
> (Keeping the quotes in that addresslist definition leads to a syntax error)
>
> So let's create "/tmp/datasource" containing one line:
> foo@???: Undisclosed-Recipient:;@mailin-ng2.xxx
> because this lets us have a lookup return data like that, much as your MySQL
> might be doing:
>
> $ exim -be
> > ${lookup {foo@???}lsearch{/tmp/datasource}}
> Undisclosed-Recipient:;@mailin-ng2.xxx
>
> I suspect that somewhere, "Undisclosed-Recipient:;" is being included as an
> item in an addresslist/... as a result of one of your queries.
>
> addresslist snert = ${lookup {$sender_address}lsearch{/tmp/datasource}}
>
> $ exim -C /etc/exim/test.conf -f foo@??? -be
> > ${if match_address{wibble@???}{+snert}}
> 2011-09-24 10:20:19 [81410] unknown lookup type ""
>
>
> So at this point I think you're constructing a list somewhere, based on a
> ${lookup} to insert text into the list as list items, as a string expansion,
> rather than using a lookup as member _of_ the list.
>
> String expansion happens first. Results are parsed for list separators.
> Result is then iterated over, and a leading semi-colon can be bad. You're
> effectively eval'ing your data


But why some other things have influence on single acl entry?

warn message = Test2
    condition = ${if match_address{${address:$rh_From:}}{${address:$rh_To:}}}


If I remove these two lines from acl_smtp_data then problem is gone. There
aren't any address lists used in it etc.

I looked into last 100 cases here and always $rh_To was in form:
"Undisclosed-Recipient:;"@???

Just tested this on my simple, laptop exim config with above 2 lines added in
content acl:

250-tarm.mavenx.pl Hello test [12.12.12.12]
250-SIZE 52428800
250-DSN
250-PIPELINING
250 HELP
mail from: <arekm@???>
250 OK
rcpt to: <arekm@???>
>>> using ACL "acl_check_rcpt"
>>> processing "accept"
>>> check hosts = :
>>> host in ":"? no (end of list)
>>> accept: condition test failed
>>> processing "deny"
>>> check domains = +local_domains
>>> tarm.maven.pl in "@"? yes (matched "@")
>>> tarm.maven.pl in "+local_domains"? yes (matched "+local_domains")
>>> check local_parts = ^[.] : ^.*[@%!/|]
>>> arekm in "^[.] : ^.*[@%!/|]"? no (end of list)
>>> deny: condition test failed
>>> processing "deny"
>>> check domains = !+local_domains
>>> tarm.maven.pl in "!+local_domains"? no (matched "!+local_domains" - cached)
>>> deny: condition test failed
>>> processing "accept"
>>> check local_parts = postmaster
>>> arekm in "postmaster"? no (end of list)
>>> accept: condition test failed
>>> processing "require"
>>> check verify = sender
>>> maven.pl in "tarm.mavenx.pl"? no (end of list)
>>> arekm@??? in "arekm@???"? no (end of list)
>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>> routing arekm@???
>>> maven.pl in "@"? no (end of list)
>>> maven.pl in "! +local_domains"? yes (end of list)
>>> calling relay router
>>> maven.pl in "*"? yes (matched "*")
>>> routed by relay router
>>> ----------- end verify ------------
>>> require: condition test succeeded
>>> processing "accept"
>>> check domains = +local_domains
>>> tarm.mavenx.pl in "+local_domains"? yes (matched "+local_domains" - cached)
>>> check verify = recipient
>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>> routing arekm@???
>>> tarm.mavenx.pl in "! +local_domains"? no (matched "! +local_domains" - cached)
>>> tarm.mavenx.pl in "! +local_domains"? no (matched "! +local_domains" - cached)
>>> calling system_aliases router
>>> system_aliases router declined for arekm@???
>>> calling localuser router
>>> routed by localuser router
>>> ----------- end verify ------------
>>> accept: condition test succeeded
>>> DSN-AJ(smtp-in): orcpt: NULL flags: 0

250 Accepted
DATA
354 Enter message, ending with "." on a line by itself
From: <arekm@???>
To: "Undisclosed-Recipient:;"@???
>>> host in ignore_fromline_hosts? no (option unset)


PDKIM >> Hashed body data, canonicalized >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>> mavenx.pl in "tarm.mavenx.pl"? no (end of list)
>>> arekm@??? in "arekm@???"? no (end of list)

blabla
.
PDKIM <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>> using ACL "acl_check_content"
>>> processing "warn"
>>> mavenx.pl in ""Undisclosed-Recipient"? no (end of list)

LOG: 1R7QBc-0005Sl-Nj unknown lookup type ""


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email