I have regex in my /etc/raddb/site-enabled/default authorize section as :
if (User-Name =~ /^([^@]*)@([-A-Z0-9]+(\\.[-A-Z0-9]+)+)$/i) {
# user has a valid-looking realm
update request {
Stripped-User-Name := "%{1}"
#Realm = "%{tolower:%{2}}"
Realm = "%{toupper:%{2}}"
#Realm = "%{2}"
}
}
else {
# malformed NAI
update reply {
Reply-Message := "malformed username "
}
reject
}
update control {
Proxy-To-Realm := LOCAL
}
}
else {
update control {
Proxy-To-Realm := DEFAULT
}
}
I tried enabling in proxy.conf
realm "~(.*\\.)*example\\.com$" {
}
no luck. any hint or point on this ?