1 Mutt-LDAP provides an `external address query script`_ for Mutt_ which
2 connects to LDAP_ databases using python-ldap_. It can cache queries
3 locally in case your LDAP server is slow or not always available,
4 expiring cached queries after a configurable amount of time.
15 I've packaged Mutt-LDAP for Gentoo_. You need layman_ and my `wtk
16 overlay`_. Install with::
18 # emerge -av app-portage/layman
20 # emerge -av mail-client/mutt-ldap
25 If you're installing by hand or packaging Mutt-LDAP for another
26 distribution, you'll need the following dependencies:
28 ============ ==================== =========== ======================
29 Package Purpose Debian_ Gentoo_
30 ============ ==================== =========== ======================
31 python-ldap_ LDAP connections python-ldap dev-python/python-ldap
32 PyXDG_ Optional XDG support python-xdg dev-python/pyxdg
33 ============ ==================== =========== ======================
38 Mutt-LDAP is available as a Git_ repository::
40 $ git clone git://tremily.us/mutt-ldap.git
42 It is also mirrored on GitHub_. To install the checkout, run the
45 $ python setup.py install
47 or you can just copy ``mutt_ldap.py`` into to your ``PATH``.
52 Add the following line to your ``~/.muttrc``::
54 set query_command = "mutt_ldap.py '%s'"
56 Search for addresses (from Mutt_) with ``^t``, optionally after typing
57 part of the name. Configure your connection by creating
58 ``$XDG_CONFIG_HOME/mutt-ldap.cfg`` containing something like::
61 server = myserver.example.net
62 basedn = ou=people,dc=example,dc=net
64 The query cache (enabled by default) will be created at
65 ``$XDG_DATA_HOME/mutt-ldap.json``, unless overriden by an explicit
66 ``cache.path`` setting.
68 See the ``CONFIG`` options in ``mutt_ldap.py`` for other available
69 settings. See the `XDG Base Directory Specification`_ for more
70 details on configuration and cache file locations. If the ``xdg``
71 module supplied by PyXDG_ is not available, the default configuration
72 path falls back on ``~/.config/mutt-ldap.cfg`` and the default cache
73 path falls back on ``~/.cache/mutt-ldap.json``.
78 This project is distributed under the `GNU General Public License
79 Version 3`_ or greater.
84 Use the `GitHub issue tracker`_ to submit bugs.
89 `mutt_ldap_query`_ is a Perl script with a similar purpose.
91 .. _external address query script:
92 http://www.mutt.org/doc/manual/manual-4.html#ss4.5
93 .. _Mutt: http://www.mutt.org/
94 .. _LDAP: http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol
95 .. _python-ldap: http://www.python-ldap.org/
96 .. _Gentoo: http://www.gentoo.org/
97 .. _layman: http://layman.sourceforge.net/
98 .. _wtk overlay: http://blog.tremily.us/posts/Gentoo_overlay/
99 .. _Debian: http://www.debian.org/
100 .. _PyXDG: http://freedesktop.org/wiki/Software/pyxdg
101 .. _Git: http://git-scm.com/
102 .. _XDG Base Directory Specification:
103 http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
104 .. _GNU General Public License Version 3: http://www.gnu.org/licenses/gpl.html
105 .. _GitHub: https://github.com/wking/mutt-ldap
106 .. _GitHub issue tracker: https://github.com/wking/mutt-ldap/issues
107 .. _mutt_ldap_query: ftp://ftp.mutt.org/pub/mutt/contrib/mutt_ldap_query.README