Redirect to pool to bypass SSL offloading for Exchange Hybrid setup - syntax issue(s)
Hello DevCentral Community,
We recently configured a hybrid setup between Exchange2010 and O365 but we're running into issues migrating mailboxes between the two environments. After some googling and testing various 'solutions' we've narrowed down the cause. The on-prem Exchange2010 environment is behind the F5 and was setup via iApp (working great!) - when migrating a mailbox O365 connects to on-prem via the CAS MRSProxy in EWS: the issue with this is that this particular connection cannot (per MS documentation) be SSL offloaded and must make a connection directly to one of the CAS servers.
I am trying to modify the current OWA redirect iRule to looks for traffic that's trying to hit the mrsproxy.svc and directs it directly to the CAS pool but I'm running into syntax issues:
Error: line 1: [wrong args] [when HTTP_REQUEST
when HTTP_REQUEST {
if {switch -glob [string tolower [HTTP::uri]]} {
"/ews/mrsproxy.svc"
SSL::enable serverside
pool exchange2010_cas_pool
CACHE::disable
return
}
} elseif { ([HTTP::uri] == "/") } {
HTTP::redirect https://[HTTP::host]/owa/
}
This is my first attempt at creating an iRule and I'm not having much luck with the syntax (and possibly other things). Could someone take a look and offer advice on how to fix this - essentially the goal is anything hitting the /ews/mrsproxy.svc goes to CAS pool directly and all other traffic follows the standard iApp behaviour to redirect (the elseif statement).
Thanks!