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

Mailing List Archive: exim: users

more than one smarthost with exim4

 

 

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


l.schimmer at cgv

Jul 27, 2012, 4:30 AM

Post #1 of 3 (347 views)
Permalink
more than one smarthost with exim4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

I do run a exim4 system on a Debian linux with small split config.
Yeah, this is the general exim help, I do know.

I want to use 2 smarthosts instead of one. All mails with a special
domain should be routed over smarthost 2, all other via smarthost 1.
Now I do search for a best solution to include this.
Should this be done best in transport?

My (more or less default debian config) does send all mails to the
smarthost transport, so I need to change the smarthost transport to
include a if condition?
Would this work fine?

Anyone got a running setup with 2 or more smarthosts?

Thank you.

MfG,
Lars Schimmer
- --
- -------------------------------------------------------------
TU Graz, Institut für ComputerGraphik & WissensVisualisierung
Tel: +43 316 873-5405 E-Mail: l.schimmer [at] cgv
Fax: +43 316 873-5402 PGP-Key-ID: 0x4A9B1723


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlASe9wACgkQmWhuE0qbFyOvJQCfeFL22I0we6pK72+SAB1mEdHU
my0AoIfww22jsFCmcIa3d6nIOXOi6gYj
=+Tp3
-----END PGP SIGNATURE-----

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


John.Burnham at admin

Jul 30, 2012, 7:01 AM

Post #2 of 3 (352 views)
Permalink
Re: more than one smarthost with exim4 [In reply to]

> I want to use 2 smarthosts instead of one. All mails with a special
> domain should be routed over smarthost 2, all other via smarthost 1.
> Now I do search for a best solution to include this.
> Should this be done best in transport?
>
> My (more or less default debian config) does send all mails to the
> smarthost transport, so I need to change the smarthost transport to
> include a if condition?
> Would this work fine?
>
> Anyone got a running setup with 2 or more smarthosts?
>
Are you using a manualroute router for your smarthost ? If so, this is documented in chapter 20 of the docs:

http://www.exim.org/exim-html-current/doc/html/spec_html/ch20.html

I can think of several ways:

1) Use domains = condition and have multiple manualroute routers which work for a different set of domains
2) Use a route_list = . The example given in the docs is

route_list = \
dict.ref.example mail-1.ref.example:mail-2.ref.example ; \
thes.ref.example mail-3.ref.example:mail-4.ref.example

which sends mail destined for dict.ref.example to either mail-1.ref.example or mail-2.ref.example and mail to thes.ref.example to either mail-3.ref.example or mail-4.ref.example. You can use * for wildcards.

3) Use route_data =. That allows you to do lookups. The example given in the docs is having a file containing:

dict.ref.example: mail-1.ref.example:mail-2.ref.example
thes.ref.example: mail-3.ref.example:mail-4.ref.example

and then using route_data = ${lookup{$domain}lsearch{/the/file/name}} in the router.

Basically, have a look at chapter 20 - the examples there are pretty good. If you have further questions then please post them back to the list.

For your example, I'd probably do something like
route_list = special_domain smarthost2; \
* smarthost

John


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


chris at roaima

Aug 10, 2012, 2:18 AM

Post #3 of 3 (306 views)
Permalink
Re: more than one smarthost with exim4 [In reply to]

Lars Schimmer <l.schimmer [at] cgv> wrote:
> I want to use 2 smarthosts instead of one. All mails with a special
> domain should be routed over smarthost 2, all other via smarthost 1.

The vanilla smarthost configuration will allow you to do this by means
of the hubbed_hosts [*] file. Configure your smarthost to be the default,
and put exceptions in /etc/exim4/hubbed_hosts.

At one time I used to do this to route email destinated for hotmail via
my ISP, thus -

hotmail.com: smtp1.bethere.co.uk
hotmail.co.uk: smtp1.bethere.co.uk

Chris

[*] Yes, I know hubbed_hosts is supposed to be for internal hosts. But
this works so enjoy it while you can.


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