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

Top Page
Delete this message
Reply to this message
Author: F. Mendez
Date:  
To: exim-users
Old-Topics: Re: [exim] Message Age in Exim?
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.