On 2012-04-07 at 17:19 +0100, p cooper wrote: > :~# cat /etc/exim4/smarthosts > @isp.org: smarthost=mail.isp.org::465 [email protected]_pass=xxxxx > @gmail.com: smarthost=smtp.gmail.com::587 [email protected] > auth_pass=xxxx > > root@server2:~# > but emails sent from the remote client isp.org are routed through my > default smarthost ( defined separately ) > > I dont think the lookup is working > > ~# exim -be > '${extract{smarthost}{${lookup{isp.org}wildlsearch{/etc/exim4/smarthosts}{$value}fail}}}' > Failed: "lookup" failed and "fail" requested > root@server2:~#
You want the keys in /etc/exim4/smarthosts to be *@isp.org with the "*" at the beginning, and the lookup type to be "wildlsearch*@" instead of "wildlsearch". There are more possibilities. See "9.3 Single-key lookup types" and "9.6 Default values in single-key lookups". -Phil -- ## List details at https://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
