Something I observed while trying to solve this: When I remove my last catch-all rule, I cannot register using email anymore at all. :-(
So, even though I have defined three different roles (based on email address) and I register using an address that should trigger one of those specific rules, the system always uses only the last catch-all role. The rules just don't get triggered, except the last catch-all. :-( On 19-10-2015 15:38, mourik jan heupink wrote: > Hi, > > On packetfence 5.3.1, inline, using email registration I would like > different roles to be applied, based on the kind of email address the > user used. But all registrations end up as type 'guest', and the roles I > configured are never applied: > >> Oct 19 15:20:25 httpd.portal(14054) INFO: Email sent to >> test-z3ihl+pkpjhbdgjk7y7...@public.gmane.org (our.domain.com: Email >> activation required) >> (pf::activation::__ANON__) >> Oct 19 15:23:40 httpd.portal(14041) INFO: [60:67:20:5d:74:98] >> Activation code sent to email test-z3ihl+pkpjhbdgjk7y7...@public.gmane.org >> from test-z3ihl+pkpjhbdgjk7y7...@public.gmane.org >> successfully verified. for activation type: guest >> (pf::activation::validate_code) > And not the expected role "heupink_com" It seems always the last 'catch > all' rule is applied. > > This is my authentication.conf: > >> root@pf:/usr/local/pf/conf# cat authentication.conf >> [local] >> description=Local Users >> type=SQL >> >> [file1] >> description=Legacy Source >> stripped_user_name=yes >> path=/usr/local/pf/conf/admin.conf >> type=Htpasswd >> >> [file1 rule admins] >> description=All admins >> match=all >> action0=set_access_level=ALL >> >> [email] >> description=Email-based registration >> email_activation_timeout=10m >> type=Email >> create_local_account=no >> allow_localdomain=yes >> >> [email rule unu] >> description=mpp students, for example >> match=all >> action0=set_role=unu_edu >> action1=set_access_duration=365D >> condition0=user_email,ends,unu.edu >> >> [email rule heupink] >> description=to test access duration >> match=all >> action0=set_role=heupink_com >> action1=set_access_duration=12h >> condition0=user_email,contains,@heupink.com >> >> [email rule maastrichtuniversity] >> description=unimaas accounts >> match=any >> action0=set_role=unimaas >> action1=set_access_duration=365D >> condition0=user_email,ends,maastrichtuniversity.nl >> condition1=user_email,ends,unimaas.nl >> >> [email rule catchall] >> description=others one month >> match=all >> action0=set_role=guest >> action1=set_access_duration=30D >> >> [null] >> description=Null Source >> type=Null >> email_required=no > Note: I also tried a condition like: > condition0=user_email,ends,heupink.com, and it also does not apply. > > I also tried bin/pfcmd configreload but it made no difference. > > What am i missing here? ------------------------------------------------------------------------------ _______________________________________________ PacketFence-users mailing list PacketFence-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/packetfence-users