[exim] Routing two copies of the incoming mail message

Top Page
Delete this message
Reply to this message
Author: Damir Baronica
Date:  
To: exim-users
Subject: [exim] Routing two copies of the incoming mail message
HI all,

I have two exim hosts in DMZ, (mail and mail2) and they are routing the
Internet incoming and outgoing mail to the relay host in LAN.
The relay host in LAN do some AV and content cheking, and if the mail
satisfy security policy pass it to the intranet MS Exchange.
DNS MX records are set with weights 20:80, one is mostly incoming
gatway, and the other is outgoing gateway. In case that one fail, the
other pick up all traffic.

I have to test some Anti Spam solution, so I have to made test case. The
idea is to made two copies of the each incoming mail sent to specific
addresses,
one original, untached delivered according to current rules and routing,
and the other copy of the same message sent to the another relay host.
I would like that somebody with more expiriens comment my suggestion to
solution:

1. I would set the filter like this: (/usr/local/exim/exim_filter):
    if $h_to contains "test@???" or 
        $h_to contains "test.user@???"
    then
       deliver test@???
       deliver test@???
          finish
    endif


The main parts of the configure file would be:
(/usr/local/exim/configure):
#
primary_hostname = mail.domain.com

system_filter = /usr/local/exim/exim_filter
system_filter_user = exim

acl_smtp_rcpt = check_recipient

errors_copy = * postmaster@???

domainlist relay_domains = *domain.com : \
    *test.domain.com


hostlist relay_hosts = localhost : \
    mswp1.domain.com : \
    mswp2.domain.com : \
    mswp3.test.domain.com


begin routers

mail_sweep:
driver = manualroute
route_list = domain.com 192.168.0.1 byname
fallback_hosts = 192.168.0.2
transport = incoming_smtp

mail_sweep_test:
driver = manualroute
route_list = test.domain.com 192.168.0.3 byname
fallback_hosts = 192.168.0.3
transport = incoming_smtp

lookuphost:
driver = dnslookup
transport = remote_smtp
no_more

begin transports
incoming_smtp:
driver = smtp
message_size_limit = 10000K

remote_smtp:
driver = smtp
message_size_limit = 20000K


Should it work like this? Are there any issues?

Best regards,
Damir