[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Regular expression in ACLs
Hi,
I'm setting up my ACLs and i'm running in some problems.
When i have this ACL:
access to dn.regex="^.*,ou=([^,]+),ou=([^,]+),ou=users,dc=example,dc=net
$"
by dn="cn=admin,dc=example,dc=net" write
by dn.regex="ou=$1, ou=$2, ou=users, dc=example,dc=net" write
by dn="cn=apache,ou=accounts,dc=example,dc=net" none break
by dn="cn=smtp,ou=accounts,dc=example,dc=net" none break
by * none
Then the expression ou=([^,]+),ou=([^,]+) is nice substituted to: $1 and
$2. For example:
ou=test,ou=test1.test,ou=test2,ou=users,dc=example,dc=net
$1: test1
$2: test2
When i then login with ou=test1.test,ou=test2,ou=users,dc=example,dc=net
i've write access to
ou=test,ou=test1.test,ou=test2,ou=users,dc=example,dc=net
Well the next ACL won't work and i don't get it:
access to dn.regex="^.*,dc=([^,]+),dc=([^,]+),ou=hosts,dc=example,dc=net
$"
by dn="cn=admin,dc=example,dc=net" write
by dn.regex="ou=$1.$2, ou=$2, ou=users, dc=example,dc=net" write
by dn="cn=apache,ou=accounts,dc=example,dc=net" none break
by dn="cn=smtp,ou=accounts,dc=example,dc=net" none break
by * none
But the following doesn't match this:
dc=test,dc=test2,dc=test,ou=hosts,dc=example,dc=net
In this example it should convert it to:
$1: test2
$2: test
And the ou=$1.$2, ou=$2, ou=users, dc=example,dc=net becomes:
ou=test2.test,ou=test,ou=users,dc=example,dc=net
But on somehow this doesn't work. Can someone point me out what i do
wrong ?
Regards,
PS: Why is this mailserver using dynablock ? I've a mailserver that is not
an open relay ? (I had to send this mail 3 times before i had the right
smtp server)
--
SMTP-server Noordelijke Hogeschool Leeuwarden.