FAQ / Routing to remote hosts / Q0312
| /Q0301 /Q0302 /Q0303 /Q0304 /Q0305 /Q0306 /Q0307 /Q0308 /Q0309 /Q0310 /Q0311 /Q0312 /Q0313 /Q0314 /Q0315 /Q0316 /Q0317 /Q0318 /Q0319 /Q0320 /Q0321 /Q0322 |
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>}}"
| /Q0301 /Q0302 /Q0303 /Q0304 /Q0305 /Q0306 /Q0307 /Q0308 /Q0309 /Q0310 /Q0311 /Q0312 /Q0313 /Q0314 /Q0315 /Q0316 /Q0317 /Q0318 /Q0319 /Q0320 /Q0321 /Q0322 |
FAQ / Routing to remote hosts / Q0312
