<div dir="ltr">I have regex in my  /etc/raddb/site-enabled/default authorize section as :<div><br></div><div><div> if (User-Name =~ /^([^@]*)@([-A-Z0-9]+(\\.[-A-Z0-9]+)+)$/i) {</div><div>     # user has a valid-looking realm</div><div>     update request {</div><div>       Stripped-User-Name := "%{1}"</div><div>       #Realm = "%{tolower:%{2}}"</div><div>       Realm = "%{toupper:%{2}}"</div><div>        #Realm = "%{2}"</div><div>     }</div><div>   }</div><div>   else {</div><div>     # malformed NAI</div><div>     update reply {</div><div>       Reply-Message := "malformed username "</div><div>     }</div><div>     reject</div><div>}</div><div><br></div><div>if (Realm == <a href="http://example.com">example.com</a>) {<br></div><div>                    update control {</div><div>                Proxy-To-Realm := LOCAL</div><div>                        }</div><div>                }</div><div>                else {</div><div>                    update control {</div><div>                       Proxy-To-Realm := DEFAULT</div><div>                     }</div><div>        }</div></div><div><br></div><div>This is working well, with <a href="http://example.com">example.com</a>. but when user sends <a href="mailto:user@a.example.com">user@a.example.com</a> then it sends to DEFAULT which send to UPstream radius server. <br><br>So, what shall I do <a href="http://a.example.com">a.example.com</a>, <a href="http://b.example.com">b.example.com</a> (valid sub-domain) not to send upstream server ? </div><div><br></div><div>I tried enabling in proxy.conf</div><div><div>realm "~(.*\\.)*example\\.com$" {</div><div>      </div><div>}</div></div><div><br></div><div>no luck. any hint or point on this ?</div></div>