forked from nixpanic/mutt-ldap
-
Notifications
You must be signed in to change notification settings - Fork 6
/
README
107 lines (79 loc) · 3.36 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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.
.. _external address query script:
http://www.mutt.org/doc/manual/manual-4.html#ss4.5
.. _Mutt: http://www.mutt.org/
.. _LDAP: http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol
.. _python-ldap: http://www.python-ldap.org/
.. _Gentoo: http://www.gentoo.org/
.. _layman: http://layman.sourceforge.net/
.. _wtk overlay: http://blog.tremily.us/posts/Gentoo_overlay/
.. _Debian: http://www.debian.org/
.. _PyXDG: http://freedesktop.org/wiki/Software/pyxdg
.. _Git: http://git-scm.com/
.. _XDG Base Directory Specification:
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
.. _GNU General Public License Version 3: http://www.gnu.org/licenses/gpl.html
.. _GitHub: https://github.com/wking/mutt-ldap
.. _GitHub issue tracker: https://github.com/wking/mutt-ldap/issues
.. _mutt_ldap_query: ftp://ftp.mutt.org/pub/mutt/contrib/mutt_ldap_query.README