diff options
| author | Thomas Fitzsimmons | 2014-11-13 02:47:49 -0500 |
|---|---|---|
| committer | Thomas Fitzsimmons | 2014-11-13 02:51:12 -0500 |
| commit | a6d46519f5a4c07fd31dae6ad71020125b3e4690 (patch) | |
| tree | 55aa439472511ae1872af54b705a04b7d04aea11 /doc | |
| parent | 4a77d69746d1d7d5ae32782075dcac1b6ed9f774 (diff) | |
| download | emacs-a6d46519f5a4c07fd31dae6ad71020125b3e4690.tar.gz emacs-a6d46519f5a4c07fd31dae6ad71020125b3e4690.zip | |
Update LDAP configuration section of EUDC manual
* eudc.texi (LDAP Configuration): Rename from LDAP Requirements
and provide configuration examples.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/misc/eudc.texi | 130 |
2 files changed, 127 insertions, 8 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 416d44d779c..a02e5393ba4 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-11-13 Thomas Fitzsimmons <fitzsim@fitzsim.org> | ||
| 2 | |||
| 3 | * eudc.texi (LDAP Configuration): Rename from LDAP Requirements | ||
| 4 | and provide configuration examples. | ||
| 5 | |||
| 1 | 2014-10-20 Glenn Morris <rgm@gnu.org> | 6 | 2014-10-20 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * Version 24.4 released. | 8 | * Version 24.4 released. |
diff --git a/doc/misc/eudc.texi b/doc/misc/eudc.texi index a54a37a72e6..66867cbc587 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 | ||
| 139 | EUDC requires external support to access LDAP directory servers | 139 | EUDC 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 | ||
| 222 | LDAP support is added by means of @file{ldap.el}, which is part of Emacs. | 222 | LDAP support is added by means of @file{ldap.el}, which is part of |
| 223 | @file{ldap.el} needs an external command line utility named | 223 | Emacs. @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 |
| 226 | were tested with OpenLDAP 2.4.23. | ||
| 226 | 227 | ||
| 228 | The 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 | ||
| 232 | requires authentication by the user @code{emacsuser} with password | ||
| 233 | @code{s3cr3t}. | ||
| 234 | |||
| 235 | These configurations are meant to be self-contained; that is, each | ||
| 236 | provides everything required for sensible TAB-completion of email | ||
| 237 | fields. BBDB lookups are attempted first; if a matching BBDB entry is | ||
| 238 | found then EUDC will not attempt any LDAP lookups. | ||
| 239 | |||
| 240 | Wildcard LDAP lookups are supported using the @code{*} character. For | ||
| 241 | example, attempting to TAB-complete the following: | ||
| 242 | |||
| 243 | @example | ||
| 244 | To: * Smith | ||
| 245 | @end example | ||
| 246 | |||
| 247 | will return all LDAP entries with surnames that begin with | ||
| 248 | @code{Smith}. In every LDAP query it makes, EUDC implicitly appends | ||
| 249 | the wildcard character to the end of the last word. | ||
| 250 | |||
| 251 | @subsection Emacs-only Configuration | ||
| 252 | |||
| 253 | Emacs can pass most required configuration options via the | ||
| 254 | @file{ldapsearch} command-line. One exception is certificate | ||
| 255 | configuration for LDAP-over-SSL, which must be specified in | ||
| 256 | @file{/etc/openldap/ldap.conf}. On systems that provide such | ||
| 257 | certificates as part of the @code{OpenLDAP} installation, this can be | ||
| 258 | as simple as one line: | ||
| 259 | |||
| 260 | @example | ||
| 261 | TLS_CACERTDIR /etc/openldap/certs | ||
| 262 | @end example | ||
| 263 | |||
| 264 | In @file{.emacs}, these expressions suffice to configure EUDC for | ||
| 265 | LDAP: | ||
| 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 | |||
| 280 | Specifying the function @code{ldap-password-read} for @code{passwd} | ||
| 281 | will cause Emacs to prompt interactively for the password. The | ||
| 282 | password 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 | ||
| 285 | password is cached. If you want to clear the cache, call | ||
| 286 | @code{password-reset}. | ||
| 287 | |||
| 288 | @subsection External Configuration | ||
| 289 | |||
| 290 | Your system may already be configured for a default LDAP server. For | ||
| 291 | example, @file{/etc/openldap/ldap.conf} might contain: | ||
| 292 | |||
| 293 | @example | ||
| 294 | BASE ou=people,dc=example,dc=com | ||
| 295 | URI ldaps://directory.example.com | ||
| 296 | TLS_CACERTDIR /etc/openldap/certs | ||
| 297 | @end example | ||
| 298 | |||
| 299 | To authenticate, the @dfn{bind distinguished name (binddn)} is | ||
| 300 | required, in this case, @code{example\emacsuser}, along with the | ||
| 301 | password. These can be specified in @file{~/.authinfo.gpg} with the | ||
| 302 | following line: | ||
| 303 | |||
| 304 | @example | ||
| 305 | machine ldaps://directory.example.com binddn example\emacsuser password s3cr3t | ||
| 306 | @end example | ||
| 307 | |||
| 308 | Then in the @file{.emacs} init file, these expressions suffice to | ||
| 309 | configure 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 | |||
| 322 | For this example where we only care about one server, the server name | ||
| 323 | can be omitted in @file{~/.authinfo.gpg} and @file{.emacs}, in which | ||
| 324 | case @file{ldapsearch} defaults to the host name in | ||
| 325 | @file{/etc/openldap/ldap.conf}. | ||
| 326 | |||
| 327 | The @file{~/.authinfo.gpg} line becomes: | ||
| 328 | |||
| 329 | @example | ||
| 330 | binddn example\emacsuser password s3cr3t | ||
| 331 | @end example | ||
| 332 | |||
| 333 | and 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 |