[exim] X-headers based routing

Top Page
Delete this message
Reply to this message
Author: Michael Zanin
Date:  
To: exim-users
Subject: [exim] X-headers based routing
Dear Collegues,

before two suns will meet together in my head,

Is it possible to route messages on the base of

        " X-headers "


(headers of incoming messages serve as rules for delivery to next relay)


The problem is, that "manualroute" driver routes only by domains,
"redirect" driver can use .forward file, but can sends only on a mail address,
(if with "delivery on <local_part@domain>") instead of transporting to a mail relay,
"queryprogram" driver runs external program for each other message, that is
heavy for server performance.


The schema is following.

Certain MTA is used as relay as well as for the loop on
another pseudo-mail server. This one pseudo-mail uses MTA again as default smart_relay
to turn back each message for delivery. He counts and stores size of messages but does not
doing something with or forging address headers, except adding extra new couple of headers.

The goal is, that after adding "new couple of headers" by pseudo, MTA must not deliver
messages on pseudo mail server on the loop again, instead deliver them in normal way
/end of ends/ to another MTA.


extern MTA|  <===========>   |   MTA       |   <============>  | extern MTA
                                   | delivery < <|
                                   |             |
                                   |             |
                                   L_> pseudo    ^
                                       mail serv |


         here is the rules set:


begin routers

smart_route_MTA:
        driver = manualroute
        domains = +domains
        route_list = +beedomains   139.ip.ip.1  ; \
                         +tierdomains   ip.ip.ip.316 ; \
                         +startdomains  ip.32.ip.56    ; \
                         +beldomains   ip.ip.7.ip
        transport = remote_smtp
        no_more


pseudo-mail:
        driver = manualroute
        domains = +mssdomains
        route_list = * pseudo-mail.dom.local
        transport = remote_smtp_50
        no_more


dnslookup:
        driver = dnslookup
        domains = ! +local_domains
        transport = remote_smtp
        ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
        no_more


------
Any help is high appreciated,

Michael Zanin
antispam team