Skip to Content.
Sympa Menu

en - Re: [sympa-users] 2-level LDAP named filter search of sorts?

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Aumont - Comite Reseaux des Universites <address@concealed>
  • To: Scott Balmos <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [sympa-users] 2-level LDAP named filter search of sorts?
  • Date: Thu, 10 Feb 2005 11:07:41 +0100

Scott Balmos wrote:
So now, I need a two-level LDAP search. The first search would search to match the [sender] address to any address in attributes mail, mailForwarding, and mailAlternate. It would grab the mail attribute (the canonic address), and then do a normal is_subscriber([returned_mail_attr]) to see if I really am a member of the list. In reality, it seems, I could get away with search(sender_canonic.ldap,[sender]) if search() would return a string that I could use in another scenario function, not just true or false.

e.g. in a scenario file...

search(sender_canonic.ldap,[sender])   smtp   -> assign_to=mail_attr
is_subscriber([mail_attr])   smtp   -> do_it

Or something similar I guess.
This is possible but not that way because named LDAP search are used as boolean, the result can't be used in another condition. Here is a way to do it. Let's say your list is named foo . The idea is to create a hidden list named foo-hidden which will contain all [mail_attr] of each subscriber of list foo. Then you can authorise foo-hidden to send message to list foo.

In order to do this create foo-hidden with the same ldap subscriber definition but use the parameter "select  all"  to fetch all emails of each person (you may need to adapt the ldap query depending on the directory semantic definition). Then create a scenario named send.subscriber_foo-hidden with
is_subscriber (foo-hidden,[sender]) smtp -> do_it

Don't forget to hidde foo-hidden list : close subscribtion, close message sending, and hidde the list with parameter visibility.

 How hard would this be to implement if it's not available? Something like this could sink my system setup if I can't find a way. :(
We plans various development in Sympa that can help you in the futur :
  • store in Sympa database cache alternative email's so scenario will be able to test alternative email and canonical email.
  • make a attribute layer in Sympa that collect attributes about the user (using LDAP or other source such as shibboleth's attibute autority) and use thoses attributes in scenario.
Hope this help.

Serge

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.19+.

Top of Page