Re: [exim] Using remote to route traffic through specific IP…

Top Page
Delete this message
Reply to this message
Author: F. Mendez
Date:  
To: Evan Booyens, exim-users
Subject: Re: [exim] Using remote to route traffic through specific IP fordomain_list - Help needed
Hello Evan,

interesting approach. What Im trying to do is to deliver through an specific
IP the traffic generated to a certain group of domains. Like grouping ip
1.1.1.1 for domainlistgroup1 and then for ip 1.1.1.2 it delivers only for
domainlistgroup2. Since it will be used in production env where one holding
enterprise group has like 6 different brands, the main helo is crutial and
internally is the correspondant IP from the time given group the one that
will make the connection and delivery. All has been setup also with SPF and
DKIM/DK.

Do you have any idea on how to achieve this?

Thanks for your comments.



-----Mensaje original-----
From: Evan Booyens
Sent: Wednesday, April 17, 2013 6:16 AM
To: F. Mendez ; exim-users@???
Subject: RE: [exim] Using remote to route traffic through specific IP
fordomain_list - Help needed

Hi

I am using routing per domain in a production environment and find that the
routing and transport settings below work very well:

## ROUTING
domain_router:
     driver      = manualroute
     ### DOMAINS TO BE ROUTED ARE DEFINED IN RELAY_TO_DOMAINS LIST
     domains     =  +relay_to_domains
     same_domain_copy_routing = true
     transport   = DELIVER
     ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
     route_data  = ${lookup{$domain}lsearch{/etc/exim/domains/routing.txt}}


## TRANSPORT
DELIVER:
driver = smtp
helo_data = $primary_hostname

## As this is an INBOUND mail firewall, I have no need to change the helo
for each domain.

Regards
Evan Booyens
Senior Linux Systems Engineer
Web Africa




-----Original Message-----
From: F. Mendez [mailto:fmendez73@terra.com]
Sent: 16 April 2013 19:03
To: exim-users@???
Subject: [exim] Using remote to route traffic through specific IP for
domain_list - Help needed

Hello, I'm doing some research on trying to set a list of domains and by
using different remote statement at transports, route and move traffic for
those domains in the list through an specific IP or list os IPs but is not
working so far... I have done the following:


## at beginig of exim.conf defined domains list and mx resolve host lists:

domainlist traffic_route1 = domain1.com : domain2.com domainlist
trafficmx_route2 = *.domain3.com : *.domain4.com


## at begin routers added the following bellow lookuphost:


traffic_route1:
    driver = dnslookup
    domains = +traffic_route1
    transport = smtp_route1
    ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
    retry_use_local_part
    no_more


throttled_trafficmx_route2:
    driver = dnslookup
    domains = +trafficmx_route2
    transport = smtp_trafficmx_route2
    ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
    retry_use_local_part
    no_more


#At transports added the following bellow remote_smtp:

smtp_traffic_route1:
    driver = smtp
    interface = ${if exists
{/etc/mailips}{${lookup{$original_domain}lsearch{/etc/mailips}{$value}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailips}{$value}{}}}}}}}}
    helo_data = ${if exists
{/etc/mailhelo}{${lookup{$original_domain}lsearch{/etc/mailhelo}{$value}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}}}}}{$primary_hostname}}
    hosts_max_try = 5
    hosts_max_try_hardlimit = 7
    multi_domain = true
    connection_max_messages = 20
    max_rcpt = 20
#  batch_max = 100
    serialize_hosts = *
#  ratelimit = 600 / 1h / strict
    retry_use_local_part



smtp_trafficmx_route2:
    driver = smtp
    interface = ${if exists
{/etc/mailips}{${lookup{$original_domain}lsearch{/etc/mailips}{$value}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailips}{$value}{}}}}}}}}
    helo_data = ${if exists
{/etc/mailhelo}{${lookup{$original_domain}lsearch{/etc/mailhelo}{$value}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}}}}}{$primary_hostname}}
    hosts_max_try = 5
    hosts_max_try_hardlimit = 7
    multi_domain = true
    connection_max_messages = 20
    max_rcpt = 20
#  batch_max = 100
    serialize_hosts = *
#  ratelimit = 600 / 1h / strict
    retry_use_local_part



So far I have tried this and also direct ip addres at interface = but all
emails sent to domainX.com keep coming out from main IP. What am I doing
wrong?


I would appreciate your help and comments to figure this out guys. Thanks in
advance.