[Exim] Conditional router

Top Page
Delete this message
Reply to this message
Author: Steve Karlsen
Date:  
To: exim-users
Subject: [Exim] Conditional router
Dear Exim Ghurus!

I’m currently undertaking a project to replace Sendmail, on our existing
MTA’s with Exim.
Have been trawling through the mailing lists and documentaion to achieve
this, before asking any daft questions.
I’m currently in the process of rewriting the sendmail routing
functionality (i.e mailertables etc) with Exim routing options.
The following is what I propose to do for one of the router conditions :

inbound_smtp1:

condition = ${ if match {*@certain.domain}{$header_To:}{true} fail}

condition = ${if match {*@certain.domain}{$header_X-mms_message-ID:}{true}
fail}

driver = manualroute

transport = remote_smtp

route_list = * certain.mailgate

The idea, is to condition the router to look at the domain in the “To :”
header and if it matches a certain domian, try the next condition, which
looks for the X-mms-message-ID: header, checking if it matches a certain
domain.
If both conditions are met, then the route_list will smart relay all of this
traffic to a certain mailgate.

My questions are :

a)    can I pick out this rather specialist header “X-mms-message-ID:” with the
header_ option?
b)    There are two “To:” headers in the message, one qualified (in the
envelope) and one in the body, which is unqualified, which one gets picked
up by the header_to option, or do they both, that then leaves me with a
problem?
c)    The fail option at the end of the match, I take it, is a “forced fail” if
the condition fails, which will then move it to the next router?


Many thanks

SteveK

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger