Dear all,

please find attached to this email the new version of mutt_ldap_query
perl script that performs ldap queries for mutt.
The distribution now includes a module for interfacing with little
brother database (m_ldap).

Enjoy!

------8<------8<------8<------8<---cut here--->8------>8------>8------>8------
mutt_ldap_query.pl version 3.1
==============================

The latest version of the code can be retrieved at 
  ftp://ftp.mutt.org/pub/mutt/contrib

This code is distributed under the GNU General Public License (GPL). See
http://www.opensource.org/gpl-license.html and http://www.opensource.org/.

mutt_ldap_query performs ldap queries using either ldapsearch command
or the perl-ldap module and it outputs the required formatted data for
feeding mutt when using its "External Address Query" feature.

This perl script can be interfaced with mutt by defining in your .muttrc:
  set query_command = "mutt_ldap_query.pl '%s'"
Multiple requests are supported: the "Q" command of mutt accepts as argument
a list of queries (e.g. "Gosse de\ Courville").

Alternatively mutt_ldap_query can be interfaced with the more generic
little brother database query program (http://www.spinnaker.de/lbdb/)
using:
  set query_command = "lbdbq '%s'"
and by specifying in your ~/.lbdb/lbdbrc file another method of query
just adding to the METHODS variable the m_ldap module e.g.:
  METHODS='m_inmail m_passwd m_ldap m_muttalias m_finger'
and the right path to access m_ldap in MODULES_PATH e.g.
  MODULES_PATH="/usr/local/lib $HOME/.lbdb/modules"
(if you moved m_ldap in ~/.lbdb/modules).
Just make sure to use the correct path for calling mutt_ldap_query
in the m_ldap script.

The following variables of the mutt_ldap_query will have to be customized
for matching your site configuration:

# hostname of your ldap server
  my $ldap_server = "ldap.crm.mot.com";
# ldap base search
  my $search_base = "o=Motorola, c=US";           
# path of the ldapsearch command if you are not using the perl_ldap modules
  my $LDAPSEARCH="/usr/bin/ldapsearch";

usage: mutt_ldap_query [-p] -s <server_name> -b <search_base> -n <server_nickname> 
<name_to_query> [[<other_name_to_query>] ...]

-p use perl-ldap module instead of ldapsearch (which is the default)
-s query ldap server <server_name>
-b use <search_base> as the starting point for the search instead of the default
-n shortcut for avoiding -s and -b options by using the script builtin
   table of common servers and associated search bases performing a 
   <server_nickname> lookup
-l supress number of matches output (suited for interfacing with little
   brother database http://www.spinnaker.de/lbdb/)

examples of queries:
  classical query:
    mutt_ldap_query.pl -s ldap.crm.mot.com -b 'o=Motorola,c=US' Gosse
  and its shortcut version using a nickname
    mutt_ldap_query.pl -n crm Gosse de\ Courville

References:
- perl-ldap module 
  http://www.perl.com/CPAN-local/authors/id/GBARR
- ldapsearch is a ldap server query tool present in ldap-3.3 distribution 
  http://www.umich.edu/~rsug/ldap)
- mutt is the ultimate email client
  http://www.mutt.org
- historical Brandon Blong's "External Address Query" feature patch for mutt
  http://www.fiction.net/blong/programs/mutt/#query
- little brother database is an interface query program for mutt that allow
  multiple searches for email addresses based on external query scripts
  just like this one 8-)
  http://www.spinnaker.de/lbdb/

Marc de Courville <[EMAIL PROTECTED]>
October 9th, 2000
------8<------8<------8<------8<---cut here--->8------>8------>8------>8------
-- 
Marc de Courville -=-  Centre de Recherche Motorola  -=- [EMAIL PROTECTED]
-=-   {Free,Net}BSD, Linux: You can also get less bang for more bucks.    -=-   
<legal>Opinions hereabove are my own and not those of my organization</legal>

mutt_ldap_query-3.1.tar.gz

Reply via email to