This is a discussion on Re: More on LDAP for distribution lists - VMS ; Hi Ed, I would have responded sooner but my reading was disrupted by the OpenVMS Technical Bootcamp and it's taken a week to get back into things. The Bootcamp itself was fun and interesting and I recommend it to all ...
Hi Ed,
I would have responded sooner but my reading was disrupted by the OpenVMS
Technical Bootcamp and it's taken a week to get back into things. The
Bootcamp itself was fun and interesting and I recommend it to all OpenVMS
practitioners.
Bill has supplied a lot of useful information. One thing he said was, "I'll
probably use Jeremy Begg's build of Perl with LDAP support ..." I still use
that build myself but not nearly as much as I used to. Note that it's an
old-ish version of Perl and an even older LDAP library (the UMich LDAPv2
library). Last year I worked on a customer project to build PMDF database
files based on AD lookups and I used Perl to prototype it but the final
version was written in "C" to make the data structure handling a lot more
straightforward. Also, by using "C", I was able to use the LDAPv3 library
which comes with OpenVMS.
> That's basically the heart of it... From my reading of the docs (v6.3,
>System Managers Guide, Section 3.1.1.4 and Table 3-1) it looks like I should
>be able to define an alias like:
>
>ldap_list: <"ldap:///ou=Users,dc=example,dc=com?mail?sub?(attr1=*$S*)"
>
>where attr1 holds a list of lists that the users is on, and then send mail to
>
>ldap_list+myfirstlist@mydomain.com and have PMDF request all the users with
>myfirstlist in their attr1. But try as I might, I cannot get any of the
>substitution sequences to work in an alias. (I've tried $L, $S, and $U before
>giving up since they're the only ones that offer the potential to create a
>single alias that will expand multiple lists.)
Here's a quick couple of suggestions.
1. Have you used a tool such as 'ldapsearch' to verify that the above URL
actually delivers what you expect? For example,
$ ldapsearch -b "ou=Users,dc=example,dc=com" -s sub "(attr1=*myfirstlist*)" mail
2. $ PMDF TEST/REWRITE/DEBUG ...
is useful to see what LDAP query is generated and the results. I
sometimes run
$ MU TCPDUMP port 389
at the same time to see what's actually happening.
Using various attributes to select your mailing list entries generally works
very nicely. I used to run the mailing lists for Encompass Australia and
used PMDF ALIAS file entries such as the following:
openvms_sig: openvms_sig-list@reprocess
openvms_sig-list: <"ldap:///dc=decus,dc=org,dc=au?mail?sub?(&(usergroups=SIGOVS)(mail>="""")(!(mail="""")))", \
[NONEXPANDABLE] NONE, \
[MODERATOR_ADDRESS] jeremy@vsm.com.au, \
[MODERATOR_LIST] encmps_root:[lists]openvms_sig.mod, \
sig-errors@encompass.asn.au, *, *, *, \
Encompass Australia - OpenVMS Special Interest Group
In a closed environment you could probably omit everything after the LDAP
URL (i.e. all the named and non-positional list parameters). It looks like
the significant difference between your list definition and mine is that
yours tries to substitute in the subaddress before doing the list expansion.
It's quite possible that this is broken in PMDF, in which case you should
log a call with Process Software's support department. An easy test would
be to hard-code an alias file entry with a known "good" subaddress value and
see if that works, e.g.
ldap_list: <"ldap:///ou=Users,dc=example,dc=com?mail?sub?(attr1=*goodli st*)"
Regards,
Jeremy Begg
+---------------------------------------------------------+
| VSM Software Services Pty. Ltd. |
| http://www.vsm.com.au/ |
| "OpenVMS Systems Management & Programming" |
|---------------------------------------------------------|
| P.O.Box 402, Walkerville, | E-Mail: jeremy@vsm.com.au |
| South Australia 5081 | Phone: +61 8 8221 5188 |
|---------------------------| Mobile: 0414 422 947 |
| A.C.N. 068 409 156 | FAX: +61 8 8221 7199 |
+---------------------------------------------------------+