Re: [ANNOUNCE] new version of mutt_ldap_query script

2000-10-11 Thread Marc de Courville

According to Brian Salter-Duke <[EMAIL PROTECTED]> (on 10/10/00):
> On Mon, Oct 09, 2000 at 01:39:51PM +0200, Marc de Courville wrote:
> > 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!
> > 
> Why not submit the m_ldap module to Roland for inclusion in the lbdb
> tarball? I suggest altering:-

as mentioned Roland, I already did propose this module.
But as underlined, it deserve more thinking and work to have a clean 
and easy user configuration.

I will work on it as soon as I have some time.

Thanks for the remark BTW.

Kind regards,
-- 
Marc de Courville -=-  Centre de Recherche Motorola  -=- [EMAIL PROTECTED]
-=-   {Free,Net}BSD, Linux: You can also get less bang for more bucks.-=-   
Opinions hereabove are my own and not those of my organization



Re: [ANNOUNCE] new version of mutt_ldap_query script

2000-10-10 Thread Roland Rosenfeld

On Tue, 10 Oct 2000, Brian Salter-Duke wrote:

> On Mon, Oct 09, 2000 at 01:39:51PM +0200, Marc de Courville wrote:

> > 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).

> Why not submit the m_ldap module to Roland for inclusion in the lbdb
> tarball?

He did submit it to me some hours before the above announcement.  The
problem is, that I personally would like it to be much more
configurable than the current version (at the moment you usually have
to edit the mutt_ldap_query script before you can use it for a special
ldap server).  But we are working on this point, so there will be a
lbdb with m_ldap in the future.

> m_ldap_query()
> {
>   $LDAP_QUERY_SCRIPT -l -p "$@"
> }
> 
> then add something like:-
> 
> LDAP_QUERY_SCRIPT=$HOME/dev/mutt_query/mutt_ldap_query-3.1.pl
> 
> to your lbdbrc file.

I'd prefer to change mutt_ldap_query in a way, that allows to install
it once for all users and make it configurable at runtime for
different ldap servers.

Tscho

Roland

-- 
 * [EMAIL PROTECTED] * http://www.spinnaker.de/ *



Re: [ANNOUNCE] new version of mutt_ldap_query script

2000-10-09 Thread Brian Salter-Duke

On Mon, Oct 09, 2000 at 01:39:51PM +0200, Marc de Courville wrote:
> 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!
> 
Why not submit the m_ldap module to Roland for inclusion in the lbdb
tarball? I suggest altering:-

#! /bin/bash -posix

m_ldap_query()
{
$HOME/dev/mutt_query/mutt_ldap_query-3.1.pl -l -p "$@"
}

to:-

#! /bin/bash -posix

m_ldap_query()
{
$LDAP_QUERY_SCRIPT -l -p "$@"
}

then add something like:-

LDAP_QUERY_SCRIPT=$HOME/dev/mutt_query/mutt_ldap_query-3.1.pl

to your lbdbrc file. This makes the modules generic and you can easily
alter the lbdbrc file when you upgrade.

Cheers, Brian.

-- 
Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]  
  School of Biological, Environmental and Chemical Sciences, SITE,
Northern Territory University, Darwin, NT 0909, Australia.  Phone 08-89466702. 
Fax 08-89466847  http://www.smps.ntu.edu.au/school/compchem.html



[ANNOUNCE] new version of mutt_ldap_query script

2000-10-09 Thread Marc de Courville

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  -b  -n  
 [[] ...]

-p use perl-ldap module instead of ldapsearch (which is the default)
-s query ldap server 
-b use  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 
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.-=-   
Opinions hereabove are my own and not those of my organization

 mutt_ldap_query-3.1.tar.gz