Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

multiple smarthost config problems

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


paul at woolsack

Apr 7, 2012, 9:19 AM

Post #1 of 2 (250 views)
Permalink
multiple smarthost config problems

Im trying to get this configured, based on
http://www.tgunkel.de/docs/exim_smarthosts.en

:~# grep -A 7 'smarthost_auto' /etc/exim4/exim4.conf
smarthost_auto:
debug_print ="T. auto_route remote_smtp for $local_part@$domain from
$sender_address "
self = send
condition =
${extract{smarthost}{${lookup{$sender_address}wildlsearch{/etc/exim4/smarthosts}{$value}fail}}}
driver = manualroute
route_list = "*
${extract{smarthost}{${lookup{$sender_address}wildlsearch{/etc/exim4/smarthosts}{$value}fail}}}"
transport = remote_smtp

:~# cat /etc/exim4/smarthosts
@isp.org: smarthost=mail.isp.org::465 auth_name=me [at] isp=xxxxx
@gmail.com: smarthost=smtp.gmail.com::587 auth_name=xxxx [at] gmail
auth_pass=xxxx

root [at] server:~#
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 [at] server:~#


--
## 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/


exim-users at spodhuis

Apr 8, 2012, 6:27 PM

Post #2 of 2 (246 views)
Permalink
Re: multiple smarthost config problems [In reply to]

On 2012-04-07 at 17:19 +0100, p cooper wrote:
> :~# cat /etc/exim4/smarthosts
> @isp.org: smarthost=mail.isp.org::465 auth_name=me [at] isp=xxxxx
> @gmail.com: smarthost=smtp.gmail.com::587 auth_name=xxxx [at] gmail
> auth_pass=xxxx
>
> root [at] server:~#
> 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 [at] server:~#

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/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.