regex in suffix

Tony Peña emperor.cu at gmail.com
Fri Mar 22 18:23:26 CET 2013


well.. ok. sorry for that i do multiple elsif in the condition.. to parse
the rest of domains....



2013/3/22 Tony Peña <emperor.cu at gmail.com>

> Hi to all.
>
>
> I have some suffix configure, to can do load balance between some sql
> accountings servers.
> and I have this check into radiusd.conf
>
> if (User-Name =~ /^(.+)@institute.domain.cu/) {
>                          monthlycounter2
>                         }
>                 else {
>                         monthlycounter1
>                 }
>
>
> and I have some users configured to can access by other way in the public
> PAP, using part of the suffix so i want to balance too
>
> in fact.. the question is my suffix for
>
> @institute
> @institude.domain
> @institude.domain.cu
>
> can use monthlycounter2
>
> and the rest.. with only been 'just the user part'
> by montlycounter1
>
> i test this
>
> if (User-Name =~ /^(.+)@institute?.domain?.cu/) {
>                          monthlycounter2
>                         }
>                 else {
>                         monthlycounter1
>                 }
>
> and the servers running fine.. but i'm not sure if the regex is defined
> ok...
> can help me in that...?
>
> thanxs in advance.
>
> --
> Antonio Peña
> Secure email with PGP 0x8B021001 available at http://pgp.mit.edu
> Fingerprint: 74E6 2974 B090 366D CE71  7BB2 6476 FA09 8B02 1001
>



-- 
Antonio Peña
Secure email with PGP 0x8B021001 available at http://pgp.mit.edu
 Fingerprint: 74E6 2974 B090 366D CE71  7BB2 6476 FA09 8B02 1001
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130322/8abb80d8/attachment.html>


More information about the Freeradius-Users mailing list