logs archiveIRC Archive / Freenode / #exim / 2015 / August / 7 / 1
ser
Hi, i do not understand how can I stack lookups. I want to lookup in mysql fist, and if nothing is found, do a second lookup in a text file
data = ${lookup mysql {SELECT user_email AS email FROM phpbb_users WHERE username_alias = '${quote_mysql:$local_part}' AND user_type IN (0,3)}}
data = ${lookup{$local_part}lsearch{/etc/exim4/aliases}}
how to combine those two?
jgh_
do the first lookup, with the fail-result clause being empty, settting a variable with the result
then test the variable for emptiness
if it is, do the second lookup
I'm assuming this is in an ACL?
possibly not, since you say "data="
ser
it is in a router
jgh_
ok then
notkoos
ser: perhaps a 2nd router is what you want :) (you can stack them like lookup{something}{somevalue}{lookup{...}}) but it's really ugly ;)
jgh_
do the second lookup expansion in the fail-clause of the first
laying it out over several lines helps with the ugliness a bit
ser
thanks, i'm studying the docs to understand it :)
chohe
is there a way to disable exim from sending 4xx errors to clients?
henk
well, more or less & Why do you ask? The question is a little strange and you probably have some reason for asking it like that. Its a lot easier to help knowing the context &
         

« prev next »