Dear all,

i'm a little bit confused here.

I have a smarthost configuration and several email adresses in the same domain 
are locally - others on the smarthost (not locally).

This means if someone on the local host writes an email to a recipient in a 
local domain, exim has to check if he can deliver it locally (to cyrus by 
LMTP) - otherwise the address must be at the smarthost (providers mailserver).


So i tried the follwing routers (the section "remoteuser" quoted with "#")

--- snip ---
# MySQL aliases
mysql_aliases:
  driver          = redirect
  allow_fail
  allow_defer
  data            = ${lookup mysql {MYSQL_LOCAL_DEST}{$value}}
  user            = mail
  file_transport  = address_file
  pipe_transport  = address_pipe


# System
system_aliases:
  driver = redirect
  allow_fail
  allow_defer
  data = ${lookup{$local_part}lsearch*{/etc/mail/aliases}}
  user = mail
  file_transport = address_file
  pipe_transport = address_pipe

system_aliases2:
  driver = redirect
  allow_fail
  allow_defer
  data = ${lookup{$local_p...@$domain}lsearch*{/etc/mail/aliases}}
  user = mail
  file_transport = address_file
  pipe_transport = address_pipe

#remoteuser:
#  driver = manualroute
#  domains = +local_domains
#  condition = "${if !eq{$header_X-Virus-Scanned} {1}{0}}"
#  transport = remote_smtp
#  route_list = * syndicat.com

# This router matches local user mailboxes.
localuser:
  driver = accept
  #check_local_user
  transport = local_delivery

--- snap ---

My idea was:
 if none of the routers before match and the mail was not coming from the 
smarthost - just route it to the smarthost.

In that section i (tried) checked against a header entry which is only 
available in emails which still coming from the smarthost (yes, it makes no 
sense to blow mails back to him which still comes from him to our local host).

But this can't work as exim goes anytimes goes through to the localuser: 
router. In case of a non local postbox i get an LTMP 550 error (mailbox does 
not exist).

If i place "remoteuser" after "localuser" localuser matches anytime but leads 
to the LTMP error from cyrus in cases the postbox is not local.

Can anyone help here? Any ide is very welcome here.


many many thanks,
best regards,


Niels.
-- 

---

  Niels Dettenbach
  ---
  Syndicat IT&Internet
  http://www.syndicat.com
  T.-Muentzer.-Str. 2, 37308 Heilbad Heiligenstadt - DE
  ---
  Kryptoinfo: 
  PGP public key ID 651CA20D
  Fingerprint: 55E0 4DCD B04C 4A49 1586  88AE 54DC 4465 651C A20D
  https://syndicat.com/pub_key.asc
  ---

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 
## List details at http://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/

Reply via email to