Skip to content
Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions

Q0312

Question

Is it possible to use a conditional expression for the host item in a route_list for manualroute router? I tried the following, but it doesn't work:

route_list = * ${if match{$header_from:}{\N.*\.usa\.net$\N} \
             {<smarthost1>}{<smarthost2>}

Answer

The problem is that the second item in route_list contains white space, which means that it gets terminated prematurely. To avoid this, you must put the second item in quotes:

route_list = * "${if match{$header_from:}{\N.*\.usa\.net$\N} \
             {<smarthost1>}{<smarthost2>}}"

Clone this wiki locally