Skip to content
Caching ldap address book search tool for mutt
Branch: master
Clone or download
#8 Compare This branch is 55 commits ahead, 9 commits behind nixpanic:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
COPYING
MANIFEST.in
README
README.rst
mutt_ldap.py Support older versions of pyxdg Feb 5, 2013
setup.py

README.rst

Mutt-LDAP provides an external address query script for Mutt which connects to LDAP databases using python-ldap. It can cache queries locally in case your LDAP server is slow or not always available, expiring cached queries after a configurable amount of time.

Installation

Packages

Gentoo

I've packaged Mutt-LDAP for Gentoo. You need layman and my wtk overlay. Install with:

# emerge -av app-portage/layman
# layman --add wtk
# emerge -av mail-client/mutt-ldap

Dependencies

If you're installing by hand or packaging Mutt-LDAP for another distribution, you'll need the following dependencies:

Package Purpose Debian Gentoo
python-ldap LDAP connections python-ldap dev-python/python-ldap
PyXDG Optional XDG support python-xdg dev-python/pyxdg

Installing by hand

Mutt-LDAP is available as a Git repository:

$ git clone git://tremily.us/mutt-ldap.git

It is also mirrored on GitHub. To install the checkout, run the standard:

$ python setup.py install

or you can just copy mutt_ldap.py into to your PATH.

Usage

Add the following line to your ~/.muttrc:

set query_command = "mutt_ldap.py '%s'"

Search for addresses (from Mutt) with ^t, optionally after typing part of the name. Configure your connection by creating $XDG_CONFIG_HOME/mutt-ldap.cfg containing something like:

[connection]
server = myserver.example.net
basedn = ou=people,dc=example,dc=net

The query cache (enabled by default) will be created at $XDG_DATA_HOME/mutt-ldap.json, unless overriden by an explicit cache.path setting.

See the CONFIG options in mutt_ldap.py for other available settings. See the XDG Base Directory Specification for more details on configuration and cache file locations. If the xdg module supplied by PyXDG is not available, the default configuration path falls back on ~/.config/mutt-ldap.cfg and the default cache path falls back on ~/.cache/mutt-ldap.json.

Licence

This project is distributed under the GNU General Public License Version 3 or greater.

Bugs

Use the GitHub issue tracker to submit bugs.

Related work

mutt_ldap_query is a Perl script with a similar purpose.

You can’t perform that action at this time.