Exim: how to deliver locally and send a copy to another server

I need to configure exim to deliver messages to domain abc.com and send a copy to another server, which is also configured for abc.com.

Something like that:

[email protected] sends email to [email protected]

abc.com mx resolves to 200.200.200.10 ( one of the exim servers )

Message is delivered

Exim receives the message locally AND send a copy to 200.200.200.50 

I tried to setup a smarthost:

        smarthost:
                driver = manualroute
                domains = abc.com
                transport = remote_smtp
                route_data = "200.200.200.50"

It does deliver to the other server but it doesn't save the message locally.

Any ideas of what i can do?

Thanks.


Solution 1:

You can use the unseen keyword on routers.

When this option is set true, routing does not cease if the router accepts the address. Instead, a copy of the incoming address is passed to the next router ...

from Generic options for routers.

I think try,

smarthost:
  driver = manualroute
  domains = abc.com
  transport = remote_smtp
  route_data = "200.200.200.50"
  unseen

Before the other routers?