[exim] unseen copy mail problem

Top Page
Delete this message
Reply to this message
Author: Peter McEvoy
Date:  
To: exim-users
Subject: [exim] unseen copy mail problem
Hi,
I need to take a copy of all mails sent to one domain to deliver to
another box inside my network, keeping the same local_part , but
changing the domain from barlibrary.com to umail.barlibrary.com.

I've tried this as the first router:

copy_temp:
driver = redirect
domains = barlibrary.com
data = $local_part@???
unseen

But because of (I think) the following routers, the message gets set up
twice:

    
virtual_domains:
driver = redirect
allow_defer
allow_fail
data = ${expand:${lookup{$local_part}lsearch{/etc/exim/virtual/$domain}}}
domains = dbm;/etc/exim/virtual/virtual-domains.db
file_transport = address_file
pipe_transport = address_pipe
qualify_preserve_domain
require_files = /etc/exim/virtual/$domain
retry_use_local_part
user = mail

virtual_domains_smart:
driver = redirect
allow_defer
allow_fail
data = ${lookup{*}lsearch{/etc/exim/virtual/$domain}{$value}fail}
domains = dbm;/etc/exim/virtual/virtual-domains.db
file_transport = address_file
no_more
require_files = /etc/exim/virtual/$domain
retry_use_local_part
user = mail

I also thought to try this in a system filter, but couldnt figure out
how to do so with $local_part not being available.

This is what happens with my current setup:

 exim -C test -bt pete.mcevoy@???
pete.mcevoy@??? ->
/var/spool/virtual/barlibrary.com/pete.mcevoy
  transport = address_file
pete.mcevoy@???
    <-- pete.mcevoy@???
    <-- pete.mcevoy@???
  router = lookuphost, transport = remote_smtp
  host umail.barlibrary.com [10.0.19.183]



Any pointers would be appreciated.

--
Pete