Forum Discussion
Terrence
Nimbostratus
Feb 04, 2013OWA Timeout V2
Our institution is running Exchange 2010. Back in July I presented an irule that would provide a timeout mechanism based upon Exchange timing out the session. Since then this irule no longer funct...
Terrence
Nimbostratus
Feb 04, 2013So already a couple of minor modifications.
1) Check to see if the MRHSession Cookie exists before calling ![ACCESS::session exists], as there is a tcl error otherwise
2) look for /owa/ and /owa/ to initiate a new session, as owa adds a when a user accesses calendar.(Not confirmed)
when ACCESS_ACL_ALLOWED {
set apm_mrhsession [HTTP::cookie value "MRHSession"]
if { [table lookup $apm_mrhsession] == "EXCHANGE_LOGOUT" && [ACCESS::session exists]} {
ACCESS::session remove
table delete $apm_mrhsession if { [string tolower [HTTP::uri]] != "/owa/" && [string tolower [HTTP::uri]] != "/owa/" } {
log local0. "$apm_mrhsession: Session for [IP::client_addr] expired"
}
} if { [string tolower [HTTP::uri]] != "/owa/" && [string tolower [HTTP::uri]] != "/owa/" } {
when HTTP_REQUEST {
log local0. "HTTP uri [HTTP::uri]"
if { [string tolower [HTTP::uri]] starts_ if { [string tolower [HTTP::uri]] != "/owa/" && [string tolower [HTTP::uri]] != "/owa/" } {with "/owa/" } {
if { [HTTP::cookie exists "MRHSession"] && ![ACCESS::session exists]} {
if { [string tolower [HTTP::uri]] != "/owa/" && [string tolower [HTTP::uri]] != "/owa/" } {
set cookie_sessionid [format "sessionid=null; path=/; Expires=Thurs, 01-Jan-1970 00:00:00 GMT;"]
set cookie_cadata [format "cadata=null; path=/; Expires=Thurs, 01-Jan-1970 00:00:00 GMT;"]
HTTP::respond 440 "Set-Cookie" cookie_sessionid "Set-Cookie" cookie_cadata
}
} }
set user_inactive 0
if { [HTTP::header exists "X-UserActivity"] && [HTTP::header "X-UserActivity"] == 0 } {
set mrhsession [HTTP::cookie value "MRHSession"]
set user_inactive 1
return
}
}
when HTTP_RESPONSE {
if { $user_inactive && [HTTP::status] == 440 } {
table set $mrhsession "EXCHANGE_LOGOUT"
return
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects