Forum Discussion
APM custom variable to change mail domain
Hello, I am trying to figure out the code for a custom Expression to be used in APM for a variable assign. My goal is to modify session.ad.last.attr.mail from the value that is in active directory username@test.city.state.us to username@testcity.org.
I had found another post that did something like this for parsing but was unable to adapt it to my needs.
foreach address [string tolower [mcget {session.ad.last.attr.mail}]] { if { [scan $address {@test.city.state.us:%s} mail] } { return @testcity.org } }
Appreciate any help you can provide.
Thanks, Nolan
- Stanislas_Piro2
Cumulonimbus
Hi,
use this variable assign:
string map {@test.city.state.us @testcity.org} [string tolower [mcget {session.ad.last.attr.mail}]]
Recent Discussions
Related Content
* 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