aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorStefan Monnier2015-01-23 17:20:19 -0500
committerStefan Monnier2015-01-23 17:20:19 -0500
commitac5475dacb20d240db27d56199910d8a6fcc90e8 (patch)
tree2f18fd1d40f2ba65122636bf81730ccb614a166b /doc/misc
parentfd62486e819056bc9d0f00c09731a45a7f837997 (diff)
parente56e1b924d23a358a14ab069237db35a1c76d6a9 (diff)
downloademacs-ac5475dacb20d240db27d56199910d8a6fcc90e8.tar.gz
emacs-ac5475dacb20d240db27d56199910d8a6fcc90e8.zip
lisp/net/{eudc,ldap}: Merge branch streamline-eudc-configuration
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/ChangeLog9
-rw-r--r--doc/misc/eudc.texi130
2 files changed, 129 insertions, 10 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 2baa13cea8c..e75589f92ec 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,8 @@
12015-01-23 Thomas Fitzsimmons <fitzsim@fitzsim.org>
2
3 * eudc.texi (LDAP Configuration): Rename from LDAP Requirements
4 and provide configuration examples.
5
12015-01-17 Stefan Monnier <monnier@iro.umontreal.ca> 62015-01-17 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * eieio.texi (Slot Options): Document :protection as unsupported. 8 * eieio.texi (Slot Options): Document :protection as unsupported.
@@ -28,8 +33,8 @@
28 33
292014-12-18 Eric Abrahamsen <eric@ericabrahamsen.net> 342014-12-18 Eric Abrahamsen <eric@ericabrahamsen.net>
30 35
31 * gnus.texi (Gnus Registry Setup): Explain pruning changes. Mention 36 * gnus.texi (Gnus Registry Setup): Explain pruning changes.
32 gnus-registry-prune-factor. Explain sorting changes and 37 Mention gnus-registry-prune-factor. Explain sorting changes and
33 gnus-registry-default-sort-function. Correct file extension. 38 gnus-registry-default-sort-function. Correct file extension.
34 39
352014-12-17 Jay Belanger <jay.p.belanger@gmail.com> 402014-12-17 Jay Belanger <jay.p.belanger@gmail.com>
diff --git a/doc/misc/eudc.texi b/doc/misc/eudc.texi
index b5a4e3aae40..9757c82fe7e 100644
--- a/doc/misc/eudc.texi
+++ b/doc/misc/eudc.texi
@@ -137,7 +137,7 @@ location, etc@enddots{} More information about LDAP can be found at
137@url{http://www.openldap.org/}. 137@url{http://www.openldap.org/}.
138 138
139EUDC requires external support to access LDAP directory servers 139EUDC requires external support to access LDAP directory servers
140(@pxref{LDAP Requirements}) 140(@pxref{LDAP Configuration})
141 141
142 142
143@node CCSO PH/QI 143@node CCSO PH/QI
@@ -213,17 +213,131 @@ email composition buffers (@pxref{Inline Query Expansion})
213@end lisp 213@end lisp
214 214
215@menu 215@menu
216* LDAP Requirements:: EUDC needs external support for LDAP 216* LDAP Configuration:: EUDC needs external support for LDAP
217@end menu 217@end menu
218 218
219@node LDAP Requirements 219@node LDAP Configuration
220@section LDAP Requirements 220@section LDAP Configuration
221 221
222LDAP support is added by means of @file{ldap.el}, which is part of Emacs. 222LDAP support is added by means of @file{ldap.el}, which is part of
223@file{ldap.el} needs an external command line utility named 223Emacs. @file{ldap.el} needs an external command line utility named
224@file{ldapsearch}, available as part of Open LDAP 224@file{ldapsearch}, available as part of OpenLDAP
225(@url{http://www.openldap.org/}). 225(@url{http://www.openldap.org/}). The configurations in this section
226were tested with OpenLDAP 2.4.23.
226 227
228The following examples use a base of
229@code{ou=people,dc=example,dc=com} and the host name
230@code{directory.example.com}, a server that supports LDAP-over-SSL
231(the @code{ldaps} protocol, with default port @code{636}) and which
232requires authentication by the user @code{emacsuser} with password
233@code{s3cr3t}.
234
235These configurations are meant to be self-contained; that is, each
236provides everything required for sensible TAB-completion of email
237fields. BBDB lookups are attempted first; if a matching BBDB entry is
238found then EUDC will not attempt any LDAP lookups.
239
240Wildcard LDAP lookups are supported using the @code{*} character. For
241example, attempting to TAB-complete the following:
242
243@example
244To: * Smith
245@end example
246
247will return all LDAP entries with surnames that begin with
248@code{Smith}. In every LDAP query it makes, EUDC implicitly appends
249the wildcard character to the end of the last word.
250
251@subsection Emacs-only Configuration
252
253Emacs can pass most required configuration options via the
254@file{ldapsearch} command-line. One exception is certificate
255configuration for LDAP-over-SSL, which must be specified in
256@file{/etc/openldap/ldap.conf}. On systems that provide such
257certificates as part of the @code{OpenLDAP} installation, this can be
258as simple as one line:
259
260@example
261TLS_CACERTDIR /etc/openldap/certs
262@end example
263
264In @file{.emacs}, these expressions suffice to configure EUDC for
265LDAP:
266
267@lisp
268(eval-after-load "message"
269 '(define-key message-mode-map (kbd "TAB") 'eudc-expand-inline))
270(customize-set-variable 'eudc-server-hotlist
271 '(("" . bbdb)
272 ("ldaps://directory.example.com" . ldap)))
273(customize-set-variable 'ldap-host-parameters-alist
274 '(("ldaps://directory.example.com"
275 base "ou=people,dc=example,dc=com"
276 binddn "example\\emacsuser"
277 passwd ldap-password-read)))
278@end lisp
279
280Specifying the function @code{ldap-password-read} for @code{passwd}
281will cause Emacs to prompt interactively for the password. The
282password will then be validated and cached, unless
283@code{password-cache} is nil. You can customize
284@code{password-cache-expiry} to control the duration for which the
285password is cached. If you want to clear the cache, call
286@code{password-reset}.
287
288@subsection External Configuration
289
290Your system may already be configured for a default LDAP server. For
291example, @file{/etc/openldap/ldap.conf} might contain:
292
293@example
294BASE ou=people,dc=example,dc=com
295URI ldaps://directory.example.com
296TLS_CACERTDIR /etc/openldap/certs
297@end example
298
299To authenticate, the @dfn{bind distinguished name (binddn)} is
300required, in this case, @code{example\emacsuser}, along with the
301password. These can be specified in @file{~/.authinfo.gpg} with the
302following line:
303
304@example
305machine ldaps://directory.example.com binddn example\emacsuser password s3cr3t
306@end example
307
308Then in the @file{.emacs} init file, these expressions suffice to
309configure EUDC for LDAP:
310
311@lisp
312(eval-after-load "message"
313 '(define-key message-mode-map (kbd "TAB") 'eudc-expand-inline))
314(customize-set-variable 'eudc-server-hotlist
315 '(("" . bbdb)
316 ("ldaps://directory.example.com" . ldap)))
317(customize-set-variable 'ldap-host-parameters-alist
318 '(("ldaps://directory.example.com"
319 auth-source t)))
320@end lisp
321
322For this example where we only care about one server, the server name
323can be omitted in @file{~/.authinfo.gpg} and @file{.emacs}, in which
324case @file{ldapsearch} defaults to the host name in
325@file{/etc/openldap/ldap.conf}.
326
327The @file{~/.authinfo.gpg} line becomes:
328
329@example
330binddn example\emacsuser password s3cr3t
331@end example
332
333and the @file{.emacs} expressions become:
334
335@lisp
336(eval-after-load "message"
337 '(define-key message-mode-map (kbd "TAB") 'eudc-expand-inline))
338(customize-set-variable 'eudc-server-hotlist '(("" . bbdb) ("" . ldap)))
339(customize-set-variable 'ldap-host-parameters-alist '(("" auth-source t)))
340@end lisp
227 341
228@node Usage 342@node Usage
229@chapter Usage 343@chapter Usage