[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Exim4 routers



On Sat, Feb 04, 2006 at 01:46:39AM -0800, vitaly.pougatchev@gmail.com wrote:
> Hi!
> 
> How do I configure Exim to use local delivery for some e-mail addresses
> and  Smarthost for others if they are in the same domain (@sample.com)?

Hi,

Assuming that you have configured your exim4 for smarthost and local
delivery, and that sample.com is in the local_domains list:

You could add another router between the smarthost and the local
delivery, maybe after the smarthost in the
/etc/exim4/conf.d/router/200_exim4-config_primary

special_smarthost:
  debug_print = "R: smarthost for $local_part@$domain"
  driver = manualroute
  domains = sample.com
  local_parts = ! lsearch;/list/of/special/localparts
  transport = remote_smtp_smarthost
  route_list = * DCsmarthost byname
  host_find_failed = defer
  same_domain_copy_routing = yes
  no_more

The 'smarthost' router takes care of the anybody@otherdomains.com
addresses, 'special_smarthost' would take care of the somebody@sample.com
going to the smarthost and the rest of the users would fall through to
the local delivery.

The /list/of/special/localparts is a file, which includes the users,
whose mail is delivered locally.

Note, I haven't tried this, but in theory it should work :)

Simo
-- 
:r ~/.signature

Attachment: signature.asc
Description: Digital signature


Reply to: