Forum Discussion

KevinIHA's avatar
Icon for Nimbostratus rankNimbostratus
Aug 11, 2021

iRule OWA logout 16.1 code



Does anyone have a working iRule for OWA logout on 16.1 code? I am having issues with any of my iRules on 16.1 with redirects and responses. Downgrading to 15 code is not an option right now.


Current Script:


  set apm_cookie [HTTP::cookie value MRHSession]


if {[string tolower [HTTP::uri]] contains "logoff" } {

  log local0. "Webmail - logoff triggered"

    HTTP::respond 302 noserver "Location" "/vdesk/hangup.php3?hangup_error=1" "Content-Type" "text/html" "Cache-Control" "no-cache, must-revalidate" Set-Cookie "MRHSession=deleted;expires=Thu, 01-Jan-1970 00:00:10 GMT;domain=[HTTP::host];path=/" Set-Cookie "LastMRH_Session=deleted;expires=Thu, 01-Jan-1970 00:00:10 GMT;domain=[HTTP::host];path=/"

    log local0. "Webmail - Session removed"

  if { ([ACCESS::session exists -sid $apm_cookie]) } {

    ACCESS::session remove

    log local0. "Webmail - Access Session Removed"





I'm guessing this is a bug with 16.1 code as this works just fine on 15, but I would like to hear if I'm the only one.


Thank you

1 Reply

  • Seems iRules are super picky about the order they are in in 16 code. Moved the iRule to the bottom of the applied iRules and it fixed my issue.